Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Colourising Text Help Post Reply Post New Topic
Author Message
justjon
Newbie
Newbie


Joined: 05 Mar 2009
Online Status: Offline
Posts: 10
Quote justjon Replybullet Topic: Colourising Text Help
     Posted: 05 Mar 2009 at 2:46am
Hi guys,
 
I have a report that we use for audi-trail purpouses, I am trying to figure out a way so that, if a field brings up certain text, it would highlight the line in red. So far i've had not luck. An example of what I thought should work is below, there are 2 select experts above the formula but removing them has no effect.
 
It needs to have wildcards to pick up a word within a specific line.
 
if {audit.desc} like "*bad login*" then crRed
 
If I use the above, it says "a boolean is required here."
 
Any help would be greatly appreciated.


Edited by justjon - 05 Mar 2009 at 2:49am
IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 05 Mar 2009 at 2:56am
Hi
 
Why don't you use Higlighting expert if you just want the field to change the color to red.
 
Select the field right click select Highlighting Expert then in  Highlighting Expert Click New in Item List and enter the condition in Item Editor.
 
hope that helps...
 
If you want entire details section line then right click details section select section expert ,Then in Section Expert select color tab Then click the x+2 for background color ,and check for the condition but this will change the background color to red.
 
Cheers
Rahul
IP IP Logged
justjon
Newbie
Newbie


Joined: 05 Mar 2009
Online Status: Offline
Posts: 10
Quote justjon Replybullet Posted: 05 Mar 2009 at 2:58am
Hi there,
 
Thank you for the reply.
 
The problem is, highlight expert doesn't allow wildcards, (so it picks up a line with a word in, then highlights all of it) - Or atleast, I don't think it does.
 
This is why i'm trying a workaround formula.
 
Thanks,
IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 05 Mar 2009 at 3:45am

Ohh ok no worries

Right Click the Field then select format field which will open the format editor ,Then Select the Font Tab then select x+2 next to color  and enter the code
 
if {audit.desc} like "*bad login*" then crRed
 
 
Cheers
Rahul
 
 


Edited by rahulwalawalkar - 05 Mar 2009 at 3:46am
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