COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: Dcognos1178 on 01 Feb 2011 08:58:36 AM

Title: How to make a prompt in a data item optional??
Post by: Dcognos1178 on 01 Feb 2011 08:58:36 AM
All -
I have a report that I have a data item where based off of one prompt value is how I want the report to behave.  So like this (I know code is wrong...that is what i need help with)

IF (ParamValue (date choice) = 'relative')
Then  IF ([Finish Time] between _add_days (current_date,-1*(?day offset?)) and current_date )
THEN (1)
ELSE (0)
ELSE IF ( ParamValue(datechoice) =  'range')
THEN  IF ([Finish Time] > ?Begin Date?
AND
[Finish Time] <= ?End Date?)
THEN (1)
ELSE (0)

So the prompt ?day offset?, ?Begin Date?, and ?End Date? should be optional based off of the ParamValue(datechoice).  This is put directly in the list as a value.  So I need to know the best way to accomplish this.

Any help would be greatly appreciated - let me know if you need more info.