My Cognos 10.2 report based on a SQL macro includes 17 optional prompts. The types are string, integer, and date. With the exception of the date prompts, all work properly. Numerous optional date prompt tries such as the below have not worked.
#(prompt('Beginning Date','date "1900-01-01"','1900-01-01',' and a.date >= ')#
#(prompt('Beginning Date','date','1900-01-01',' and a.date >= ')#
and a.date >= #prompt('Beginning Date','date','Current_Date')#
Per the IBM site, for date prompts, the type should be like the first.
The second reads like my working string and integer prompts.
The third will not work, partly because as an optional prompt, "and a.date >= " is outside of the prompt rather than the 4th argument.
I urgently need to resolve this issue. Please respond with suggestions as soon as possible.
Thank you.
the third prompt you defined it as date but for a default value you placed a string. If Current_Date is actually a data item then you should enclose it in [] like #prompt('Beginning Date','date','[Current_Date]')#