Crystal Reports - Apply Boolean Formulas


Advertisements

There are different Boolean operators that can be used in formula in Crystal Reports. They are −

  • AND
  • OR
  • NOT
  • Eqv
  • Imp
  • XOR

All these operators are used to pass multiple conditions in formulas −

Boolean Operators

AND operator is used when you want both the conditions in the formula to be true. Other Boolean operators and their meaning is as mentioned in the above snapshot.

Using Boolean Operators ‘AND’ −

If {CUSTOMER.CUSTOMER_NAME} [1 to 2] = "AN" and
ToText({CUSTOMER.CUSTOMER ID}) [2] = "4" then
"TRUE"
Else
"FALSE"

Using Boolean Operators ‘AND’ and ‘OR’ −

If ({CUSTOMER.CUSTOMER_NAME} [1 to 2] = "AN" and
ToText({CUSTOMER.CUSTOMER ID}) [1] = "4") or
({CUSTOMER.CUSTOMER_NAME} [1 to 2] = "Ja" and
ToText({CUSTOMER.CUSTOMER ID}) [1] = "2") then
"Five star rating CUSTOMER"
Else
"1 star rating CUSTOMER"

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