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

Save Output to Local File

Started by bcrandall, 18 Jul 2006 11:53:05 AM

Previous topic - Next topic

bcrandall

How can I save the output from a report to a local disc, rather than the Report Studio server?  I have heard that it can be done via the SDK, but didn't get any details.

Thanks for any help you can offer.

- Brian

mrcool

Hi...Hope this will help u...
The 'execute' method is called on a specific report with the option to save the report output set to true.  Then a new method is called which calls the SDK 'query' method to see if the saved output exists - more than one output may be found. Each output has a default name which is a timestamp of when the report was saved. Each saved output is extracted from the Content Store and saved to the local file system in the path specified.

Steps:

In ReportNet for example:

To run the sample:

1) Modify the following hard coded values in the main method of SaveReportAndExtractOutput.java
to reflect your own environment:

// CRN endpoint
String endpoint = "http://localhost/crn/cgi-bin/cognos.cgi";
// local file location where the output will be saved
String savePath = "F:\\Program Files\\Cognos\\crn\\webcontent\\samples\\";
// search Path to an existing report
String searchPath = "/content/package[@name='GO Sales and Retailers']/folder[@name='Documentation Report Samples']/report[@name='Add Color']";
// name of the report
String reportName = "Add Color";
 
// use this if anonoymous logon is disabled in Cognos Configuration
String userName =  "user";
String passWord =  "password";
String nameSpaceID = "namespaceID";

2. If you are not using anononymous logon, uncomment the following line if logon is required.

//connect.quickLogon(nameSpaceID, userName, passWord);

3. Compile and execute the sample code. Information on the ReportNet Java Toolkit can be found in Chapter 1 of the ReportNet SDK Getting Started Guide in the ReportNet Java Toolkit section.

sir_jeroen

Take a look at the Cognos Documentation... There's a topic for saving output to disk.

You can search for CM.OutputLocation....

Good Luck