Cognos Analytics

Expand all | Collapse all

Date picker for scheduled report

  • 1.  Date picker for scheduled report

    Posted 4 days ago
    I've a Cognos report which has a date parameter. The report is currently scheduled. 

    What I would need is:

    1. During the time of scheduled run, the date need to pick the most recent date and run the report.
    2. If a user wishes to runt he report manually, then the date picker must display the drop down.

    *Please Note - I'm using Cognos Analytics

    Any help  is greatly appreciated.


    Aswathy Rakesh

  • 2.  RE: Date picker for scheduled report

    Posted 4 days ago
    Try setting up a second prompt that is simple select value of Today and Manual.  Set your date filter as

    if ?VersionPrompt? = 'Today' then [Date] = current_date else [Date] = ?Date_Prompt?] 

    Change the Date prompt to optional on your prompt page. 
    Set up 2 report views, one for daily schedule and set the prompt value to Today and set up a User run option with the prompt set to Manual.  You could also do this without the report views if you choose, but if users are saving output it could get a little funky as to which version is available. 

    I would also put the date logic in the report header so you know which output you have.

    Unless I'm missing something in what you need for "most recent date" this should work.  If your most recent date isn't the current_date or yesterday, then you would need additional code there, but you likely already have that figured out.

    Mike Teegarden