CR-XI (R2)
ORACLE 10g Database
======================
The report is written by someone else using a COMMAND to provide so total counts from an ORACLE table.
Now we want to add OPTIONAL parameters for REGION, STATE and CITY.
I can get the STRING parameters to work if I provide an explicit value at all three (3) levels in the COMMAND -
Example -
SELECT nvl(avg(STORE.CASH),0) tot
FROM STORE
WHERE
LOCATION ='{?REGION}'AND
STATE = '{?SUB-REGION}'AND
CITY = '{?CITY}'
...but I want to be able to IGNORE the parameter within the COMMAND if an * value (or something similar) is passed.
I know I could do this by rebuilding all of the COMMAND logic within a Stored Procedure or directly within the RPT-file, but this report has 30+ COMMANDs and I am trying to avoid that.
Anyone know if there is a way to do this within the Oracle COMMAND in CR-XI (R2)...?
Thanks in advance!
Senior Business Intelligence Consultant
Toronto, Canada
SeagateInfo 7 -> Crystal Enterprise -> BOE-XI (R2) / (R3.1) | Crystal ( 7 -> 2008) design | WebI design | Best practices for Java / .Net / Web Services
ORACLE 10g Database
======================
The report is written by someone else using a COMMAND to provide so total counts from an ORACLE table.
Now we want to add OPTIONAL parameters for REGION, STATE and CITY.
I can get the STRING parameters to work if I provide an explicit value at all three (3) levels in the COMMAND -
Example -
SELECT nvl(avg(STORE.CASH),0) tot
FROM STORE
WHERE
LOCATION ='{?REGION}'AND
STATE = '{?SUB-REGION}'AND
CITY = '{?CITY}'
...but I want to be able to IGNORE the parameter within the COMMAND if an * value (or something similar) is passed.
I know I could do this by rebuilding all of the COMMAND logic within a Stored Procedure or directly within the RPT-file, but this report has 30+ COMMANDs and I am trying to avoid that.
Anyone know if there is a way to do this within the Oracle COMMAND in CR-XI (R2)...?
Thanks in advance!
Senior Business Intelligence Consultant
Toronto, Canada
SeagateInfo 7 -> Crystal Enterprise -> BOE-XI (R2) / (R3.1) | Crystal ( 7 -> 2008) design | WebI design | Best practices for Java / .Net / Web Services