COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: raj_aries on 22 Aug 2013 05:17:13 AM

Title: Capture the prompt value
Post by: raj_aries on 22 Aug 2013 05:17:13 AM
Hi Gurus,

Here is my requirement -
Wheneven the report is run for the first time from Cognos Connection it should run for the previous month, and for the subsequent runs users can select the value from the Date drop down. For this, I've included optional date prompt on the report page itself so that the users can select the required month after the first run.


We have achieved this using optional Date #prompt macro on the report page itself as below.

[Date Dataitem]=#prompt('Dprompt','date','_last_of_month(_add_months(current_date,-1))')#

However, is there any other better approach without using prompt macro.

Is there a way to identify the nullability of the prompt. I tried ?Dprompt? is null or ?Dprompt? is missing, none of these are working.

Since its an option prompt, if user is not selecting anything I want to capture this.

Please let me know your thoughts regarding this.

Thanks
Raj