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

Upgrade report to latest package version using SDK

Started by Medy4, 31 Aug 2010 10:09:59 AM

Previous topic - Next topic

Medy4

We only hold the current version of the package, and this is causing us problems every time the package has to be be updated.

After its been updated we are prompted in report studio when opening each report (200ish) to save it, to associate it with the new package.

Ideally an automated routine to find reports that are out of synch with the current package and then update the report would be a godsend.
I have created a C# .NEt routine using the SDK that loops through all the reports on the server but I can't find how to update the selected reports with the new package. The query(objectPath, parameterValues, options) method looked promising with an Update option set to True but it's not having any effect.

Can anyone point me in the right direction.

PS working in version 8.4 

bpetty

First you get all of your packages by searching "/content//package"
Then you get all of the models via:
"/content//package[@name='" + package.defaultName.value.ToString() + "']//model"

Your first entry will be the latest model.

You then get your report specification and push it into an some XML object.  My examples are Java examples, FYI.  I use XmlTextReader.

Replace "modelPath" tag item and update it with the latest model path for its package.

I then validate the report spec and then I update it.  Make sure it is an update or you will lose your schedules.