COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: imts on 07 Apr 2011 01:33:15 PM

Title: Date Prompt Issue
Post by: imts on 07 Apr 2011 01:33:15 PM
Hi Cognos Gurus,

I need a OPTIONAL DATE RANGE prompt on the prompt page which looks something like this

Start Date
- <Earliest Date> Or <select a Date from the Picker>
End  Date
- <Latest Date> Or <select a Date from the Picker>

-----------------------------
Problem is ; I have to use the ?My_Date_Parameter? in my query with some IF conditions .

If I use it in DATA ITEM then the prompt becomes mandatory [And i lose the <Earliest Date> and <Latest Date? option in the prompt]

If I use it in filter section then I am not able to use the IF clause ; it gives error - I want something like this in filter

IF (?My_Date_Parameter? = '1-1-1900' ) then (1) else (2)

[just an example but it fails :(]

Please help .

-TS
Title: Re: Date Prompt Issue
Post by: PRIT AMRIT on 07 Apr 2011 09:56:26 PM
QuoteIF (?My_Date_Parameter? = '1-1-1900' ) then (1) else (2)

'1-1-1900' -- Is your default selection? Looks like you are trying to filter the report dynamically e.g. current date or some other date field?

What exactly you want to write in the FILTER? Can you post your expression?

Thanks
prit