Crystal Reports & SQL Reporting Services Training Consultants
Account Log in:
Username:
Password:
Genius is about the conquering of chaos and mystery
 
Institute of IT Trainers - Freelance Trainer of the Year 2006 & 2009
Liverpool Business Connect Member
  Maximum Impact Solutions Limited - Reporting Solutions, Creating Answers
Reporting Solutions - Creating Answers, Crystal Reports, Dashboarding (Xcelsius) & SQL Reporting Services

The Maximum Impact Solutions Blog Feed ME!!!!

04
September

How Do I Change the Font Colour of a Field based on a String it Contains in Crystal Reports 2008?

During a recent crystal reports 2008 consultancy project I was asked "How can I change the font colour of a field, if it contained a certain string within it?"

Solution:

To achieve this on needs to use the Crystal Reports string function InStr.

The formula is as follows:

If InStr({Tablename.Fieldname},  "SearchString",1) <> 0 Then CrAqua Else CrNavy

The formula would be attached via the conditional formatting button of the Font Color option for the field

If you have any questions, leave us a comment below, or need any assistance, please do not hesitate to Contact Us


MAKE A COMMENT

Name *

Email Address *

Comment *