Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Selective Font Color Formatting Post Reply Post New Topic
Author Message
pinakeep
Newbie
Newbie


Joined: 19 Aug 2010
Location: India
Online Status: Offline
Posts: 2
Quote pinakeep Replybullet Topic: Selective Font Color Formatting
     Posted: 19 Aug 2010 at 1:47am
Hi,
 
Following lines get printed in a report in the mentioned format. I want to change the font color of the "^" symbol to something different. how do i do it through formula? the number of lines and ^ symbols gets generated dynamically so it can be multiple lines for different cases. 
 
Line1
^
Line2
^
Line3
^
Line4
 
thanks
Pinakee
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 19 Aug 2010 at 10:20am

Do you know what the maximum number of lines will be?

I would create a running count that resets to 0 for each case - I'll call it {#LineCount} for this example.  Then right-click on the text object that contains "^", Format Object, go to the Font tab and click on the formula button to the right of the font color.  You then create a formula something like this:
 
Switch(
{#LineCount} = 1, crRed,
{#LineCount} = 2, crBlue,
{#LineCount} = 3, crGreen,
...etc until you get to the max number of lines...
true, crBlack)
 
-Dell
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum