Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Text search parameter highlighting Post Reply Post New Topic
Author Message
katfoxus
Newbie
Newbie
Avatar

Joined: 17 Oct 2011
Location: United States
Online Status: Offline
Posts: 19
Quote katfoxus Replybullet Topic: Text search parameter highlighting
     Posted: 04 May 2012 at 9:29am
I have a text search parameter coming from a stored procedure on SQL server. I need the word/phrase the client enters to be highlighted within the case text. Is there a way to do this with conditional formatting. For example:
 
Client enters "spill" in the parameter and the case text is:
 
John spilled milk on the floor.
 
I need it to show:
 
John spilled the milk.
IP IP Logged
katfoxus
Newbie
Newbie
Avatar

Joined: 17 Oct 2011
Location: United States
Online Status: Offline
Posts: 19
Quote katfoxus Replybullet Posted: 04 May 2012 at 9:41am
ok so it didn't show up right. i need the spill to be highlighted in yellow.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 04 May 2012 at 10:08am
since conditional formatting affects the whole field...
the best trick I have heard for this is create several formulas that iterate each part that you want: before the highlight, the highlight, after the highlight. Then you can combine all 3 formulas into 1 text field.  Now you can change the color on the highlight section and it all should display as desired.
 
I haven't tried this myself, DBlank used it as a solution, but being as it was so slick, I filed it away as a useful trick should the need arise.
 
HTH
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