How can I get dynamically define day of the month? For example get always 10th of each month and use it as part of the report filter, i.e. on February 28th it will return February 10th, on March 5th filter will use February 10th again, but on March 11th, report will be running with March 10th.
Hope that clearâ€¦ :o
I use Cognos 8.3 and when i create a prompt with a date filter, i always get the current date?
I’m not really sure what you answer means… ???
This is not about prompt at all, this is about date range for a report, dynamic range, no user interaction.
April 5, 2011, 7:41pm
Dynamically set the prompt default value to last day of the month
On the prompt page, drag a value prompt and change its name to endOfMonthPrompt in the properties pane.
Drag an HTML item next to the prompt containing the following code:
Drag a query calculation to the right of the HTML item in step 2, and paste the following expression:
EXTRACT(day, current_date) + _days_to_end_of_month (current_date)
Drag another HTML item to the right of the calculation in step 3, and add the following code:
I guess I’ve got everyone confuse with my question: this is NOT about report prompt at all. This should be part of the filter, dynamic filtering.
This is interesting script. I didn’t think to try this out with Java Script. I will give a shot. Thanks!