Rob's TIMSS Blog

My discoveries and ramblings of TIMSS/Personify.

Saturday, May 06, 2006

Crystal Reports: Using Parameters to Control a Report

When you add a Crystal Report to the TRS, you can control the behavior of the report using paramters that are passed to the report. Using the Select Expert you can use an or to control what happens.

For example the PROSP_Filter parameter is used to pass either ALL, PROSP or NON-PROSP to control what USR_COF_STATUS is pulled for the report. In the statement below, only one of the conditions is true because of the paramete value:

({?PROSP_Filter}="ALL"
or ({?PROSP_Filter}="PROSP" and {CUSTOMER.USR_COF_STATUS} in ["PROSP","RMEM"])
or ({?PROSP_Filter}="NON-PROSP" and not({CUSTOMER.USR_COF_STATUS} in ["PROSP","RMEM"])))

For the or statements, both parts must be true, so the PROSP_Filter controls which USR_COF_STATUS is pulled for the report. You could obviously add more conditions to the or statements to give the parameter more control over what data is pulled for this report.

Applies to: TIMSS6

0 Comments:

Post a Comment

<< Home