Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

COLOUR FORMATTING ON STRINGS NOT OBJECTS

Status
Not open for further replies.

flash999

Programmer
Jun 18, 2001
4
GB
Hi,

I 've got a formula in the details section which makes up a number of string variables so we can output all of the strings at the end of a report.

Some of the elements of the string (if they meet certain criteria) need to be a different colour. But they have to remain as part of the same string.

Can someone help me? I know you can format sections and format whole objects, but i've never come across colour formatting within the formula editor.

i.e. if a then buildstring:=buildstring + newelement
if b then buildstring:=buildstring + (red) new element

I'm not too sure if you can do this or what the syntax of colour formatting is within Crystal.

Thanks for listening.
 
Although I am not a big fan of this....perhaps you can embed the separate text string formulas into a single text field if they are predictable enough

Jim Broadbent
 
Dear Flash999,

You can do this using html tags and using the Format Field/Paragraph Formatting set to html:

an example
if a then buildstring:=buildstring + newelement
if b then buildstring:=buildstring +
&quot;<font color = red >&quot; + newelement+ &quot;</font color>&quot;

The rules for use is that the start tag and closing tag must be enclosed within quotes. You can start the tag in one Text String and end it in another but they must be within &quot;&quot;

Hope this is helpful,

ro Rosemary Lieberman
rosemary@microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top