If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Set Default Date Prompts in Schedule

Started by elee123, 17 Nov 2014 11:14:19 AM

Previous topic - Next topic

elee123

Hi Everyone,
I've got 2 date prompts in a report for users to enter 'from date' & 'to date' when they run it manually.
But I also need to schedule this report to run daily with both prompts set to today's date.
In the schedule setting, if I set "Override the default values" with date1: 'Nov 17, 2014'  &  date2: 'Nov 17, 2014', will the report run automatically with the Nov 18 dates tomorrow?  If not, how do we make sure the report run with today's date on daily basis?


navissar

Schedules do not keep dynamic prompt values. You have two options:
1. Set up a the date filter in your report to default to today (You can use another prompt for that).
2. Use Event Studio - you can pass a data item (current_date) to the parameter via Event Studio.
Pick a way and I'll do my best to guide you through.

elee123

Nimrod,
Can I have option 2 ?
Thank you.

navissar

Sure! It's a nice solution.
(His Muppetness - maybe this should be moved to ES board?)
So, you open Event Studio from Cognos launch menu, and select any package.
Events are made of a condition and tasks. Tasks - such as running a report, sending an email and so on - are executed when the condition is met. So, for example, you can have an email sent to the sales manager of a certain region if her sales team isn't meeting its target, in which case your condition will be [actual sales]<[target].
Now, in our case, there is no condition - we want the event to run the report every day/week/month/whatever schedule you need, regardless of anything. so in the condition tab we'll just put 1=1.



Next you add a task to run a report.


Use the "select the report" link to select your report. You'll see a list of the report parameters:


Now, see the left hand side bar? It has tab buttons at the bottom. Click the second one from the left:


Right click inside the pane and select "new calculation"


Create your date calculation. The example is for "yesterday" but can be made into anything:


Save the data item by clicking on OK, select it on the left hand side pane, and add it as the parameter value:


Set any other report options using the Set... link (Such as email distribution and so on).
you can now save the event and schedule it as you would a report, and you are basically done!

BigChris

Another method that I use is to have a number of "preset" date ranges...one of which is yesterday. When you schedule the the report you just select that option:

http://cognostips.weebly.com/blog/date-prompts

navissar


BigChris

High praise indeed! Glad I'm able to give something back to this forum...it's helped me a lot.

Lynn


elee123


khabaleshri

I am facing same issue. User required both manual selection and default selection for end date while scheduling.
I have tried your event studio solution but event throws error CNC-ASV-0050 Event condition not met
Any other way other than event studio? I am using relational model.
I want to set current date as default end date prompt(this is date prompt) for scheduling report.

dougp

Undead thread.  Nice.

The way I usually handle this is to have two reports:  One with prompts and one with the computed date filters for the schedule.
Another method may be to make the date prompts optional with [computed] defaults.  I think you can do this with a prompt macro.

Regarding the Event Studio solution:  It looks like there is a problem with how you defined your agent:
https://www-01.ibm.com/support/docview.wss?uid=swg21342900
https://www.cognoise.com/index.php?topic=21832.0

khabaleshri

Thanks. I have figured out solution for this. I have created 1 value prompt with manual and schedule static choices. If user select the schedule then main query will filter till current date. Once manual selection, Date prompt will appear on prompt page ( conditional explorer,reprompt button).
Default selection for value prompt as 'schedule' . So it will serves two purposes. One who wants to see specific date range result and dynamic current date for scheduling