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

Renaming Scheduled Reports

Started by merlc99, 26 Apr 2007 01:47:46 AM

Previous topic - Next topic

merlc99

Hi all , I have a question about report scheduling/ scripts. Right now I have a job that runs multiple reports and saves them to a local file that I set up in the cm.outputlocation and then when those reports are saved it saves with the long file names and xml descriptor. What I was wondering is if there is a script that I can run that is similar to the burstkeyrename.vbs script and batch file that renames the reports with their original file names.

*NL*

Maybe I don't understand what you are actually doing, but what is wrong with the burstkeyrename script?

I've used that script to rename all the reports when they are bursted, works like a charm.

merlc99

The peoblem is that the reports I am running are regular list reports that are not bursted, and I did not know if there was a script similar to the burstkey script that could be used for regular non bursted list reports.

*NL*

I have no experience with scheduling list reports like that.
Is there any describing xml node in the xml file?
You could always edit the vb script to use that node.

Sorry that I can't be of more help.

merlc99

It seems that the original file name is stored in the xml descriptor file between a report search tag. I'm not sure if there is any way to take the file name from the descriptor filE, or if there is something I can add in an HTML item in a report.

*NL*

If there is a describing node in the xml file, you can edit the visual basic file that is used for renaming the bursted reports. What that script does is just read the describing xml file and look for the node that has the reportname, change the node name in the script and you should be set.

merlc99

Well I'm basing my script off of the burstkey script and I cannot get that to work, I am using the one from support link. I keep getting a Visual Basic compilation error. Is there something I need to change on the original script to get it to work. I changed all of the file names, but I still get an error. Did you have to adjust anything to your code to get it to work?

*NL*

I don't have internet access with my notebook here, I can sent you a script that works for me later on.
You will have to edit the node name in it, and it should work.
I think I've had some troubles with the standard script off of the support website.  Sent me a PM if you want the script, so I'll remember to sent it.

*NL*

I've attached a zipfile with this post.
In the zip you'll find a vb script, all you have to do is to edit 'Burstkey' to the right xml node and change the source and destination folders at the bottom.

Good luck!

merlc99

Thanks for the script and the help you have given me but I am still having a problem extracting the information from the node where the file name is stored. Here is an example of the node from xml descriptor: <reportSearchPath>/content/folder[@name='FolderName']/folder[@name='SubfolderName']/report[@name='FileName']</reportSearchPath>

So the text that I want to extract is the bold file name part but I do not know how to put that in the script where your 'Burstkey' part is.

*NL*

You have to change Burstkey for reportSearchPath.

merlc99

When it says source folder, what do you mean by that and should the vb script be separate from my destination folder? Because I did try it with reportsearch but the serial number is still used as the name of the file. I was not sure if I had to add something more than just reportsearch as the node because there are a lot of things in that node.

*NL*

I think you can place the script anywhere you want, and for source folder you dial in the location of the scheduled reports (D:\My Reports\ , or wherever cognos puts them for you), the destination folder is where you want the reports to end up after the renaming. So you could make a new folder inside the My Reports folder and call it Renamed or whatever and link to: D:\My Reports\Renamed.

merlc99

Unfortunately I cannot get the file name part of the reportsearchpath node to be extracted. I don't think I have the right Xpath or that node cannot just be extracted. If you could try and help me with this I would appreciate it.