Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9269

Re: Saved Data Selection Formula

$
0
0

You don't actually have to have an If statement for this.  Your comparisons all evaluate to true or false anyways  So, what you can do is something like this:

 

(not hasvalue({?Indicator}) or {?Indicator}=0) or

({?Indicator} = 1 and {p_rpt_Customer_AutoHigh.is_314a} ) or

({?Indicator} = 2 and {p_rpt_Customer_AutoHigh.is_auto} ) or

({?Indicator} = 3 and {p_rpt_Customer_AutoHigh.is_autohigh_update}) or

...

 

Notice where I've put the parentheses - these are very important for getting this to work correctly.

 

Note also that you don't have to include "hasvalue()" in all of the lines.  This is because of the way Boolean expressions are processed.  Because of the "or", Crystal will only process until it hits the first "true" result.  If {?Indicator} doesn't have a value, it will be caught with the "not hasvalue({?Indicator})" in the first line and none of the rest of the formula will be processed.

 

-Dell


Viewing all articles
Browse latest Browse all 9269

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>