Dynamically define day of the month

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.


Maybe you can rebuild this sample javascript?

Dynamically set the prompt default value to last day of the month

  1. On the prompt page, drag a value prompt and change its name to endOfMonthPrompt in the properties pane.

  2. Drag an HTML item next to the prompt containing the following code:

  3. 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)

  4. 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!