In SAP Crystal Reports XI, return records that match multiple conditions


It is advisable to use functions to pass such filter conditions in CR. Also try changing the order of your condition like −

({PR.cov} = "A" and {PR.cov}="B") or {PR.cov} = "A"
Try using function like this:
{@A}:if {PR.cov} = "A" then 1 else 0

To create custom functions in Crystal Report, navigate to Report Menu → Formula Expert → Right Click on Custom Functions → New

It is advisable to use custom functions when you have multiple parameters to pass in the condition. You can also use the following when you have two string parameters −

( 'A' IN {?cov} OR {PR.cov} IN {?cov )
AND
( 'B' IN {?cov} OR {PR.cov} IN {?cov )

Updated on: 13-Feb-2020

127 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements