Crystal Reports - Conditional Formatting


Advertisements

To write a conditional formatting formula, right-click the report and click Format Result Object element → select the property on which you want to apply conditional formula → click and it will open formula workshop.

Write the formula in the formula text pane, save and close it.

Conditional Formatting

In this example, if you can print Total Price greater than 60000 in Green and below 60000 in Red, this can be passed in formula workshop.

Formula Example

Formula Example2

In this example, crGreen, crRed, crBlack is used. You can also use actual numeric value of color constants.

There are three common conditional formatting functions −

  • CurrentObjectValue
  • DefaultAttribute
  • GridRowColumnValue

DefaultAttribute can be used for any formatting formula, CurrentObjectValue for any formatting formula where you are formatting an object value, and GridRowColumnValue can be used for any formatting formula where you are formatting an object value in a Cross-Tab.

Useful Video Courses


Video

Crystal Reports Online Training

37 Lectures 2 hours

Neha Gupta

Video

Crystal Healing: The Complete Certified Practitioners Course

61 Lectures 4.5 hours

Sasha Miller

Video

Certificate in Crystal Healing for Kundalini & Chakra

31 Lectures 32 mins

Prof Krishna N Sharma

Video

Certification in Crystal Healing - Accredited Masterclass

35 Lectures 2 hours

Prof Krishna N Sharma

Video

Certification in Crystal Reiki - Master / Teacher Training

24 Lectures 2 hours

Prof Krishna N Sharma

Advertisements