Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scheduler and Recurring Tasks 2

Status
Not open for further replies.

MooSki

Programmer
Jun 13, 2002
22
GB
Hi guys,

It's my first post, so please be gentle with me. I am new to Cognos and have (hopefully) an easy question for you.

I've set up an impromptu report that I want to run every day. I've gone into the scheduler and there is an option there to set a recurring task, an ideal solution. However, i would like to know if there is a way to alter the name of the export file automatically when I'm not here, eg over the weekend.

Ideally it would be nice if the exported reports were saved as something like:

C:\ExportFile130602

to signify the date they were produced.

If anyone has any ideas how to do this, I would greatly appreciate this.

Thanks in advance,
MooSki
 
MooSki,

It's fairly easy to do this by calling the report from within a macro. The macro runs the report, and when saving the output, you can specify a dynamic file name using a concatenation of text (such as your "C:\ExportFile") and a variable, such as:

x$ = format(date,"ddmmyy")

which will give you your date stamp in the format you desire.

Your Impromptu docs have some useful examples of simple macros to run reports and save the output.

The only hiccup is that Scheduler has no facility to store prompts for macros. Let me know if the report requires prompts and I'll discuss your options.

HTH,

Dave Griffin :)
 
Dave,

Excellent stuff! Very much appreciated and I'll look at the sample macros and hopefully they will point me in the way I want to go. I'll probably be implementing this next week, so I'll give some feedback of what I'll be doing.

Many thanks,
Lawrence.
 
Dave,
I have implemented this code into a macro using the "macro help" files as you suggested. I'd agree, they're quite helpful which makes a pleasant change! I've tested it too and it works perfectly.

Thanks very much for your help and advice. I owe yo a pint!

MooSki.

 
Mooski,

You're very welcome. It's good to hear back that a suggestion was useful. There are few limits to what you can do in a macro, so don't be shy about using them to solve all sorts of problems.

Be sure to check back in the forum to see if others have issues you can shed light on. Also be sure to mark other's post as helpful if you think they deserve it.

It's been hot in Washington. I'll take you up on that pint!

Regards,

Dave Griffin :)


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top