Bursting a Report Using SDK and Save the Output to the Local File System
For this example, we will be using the "GO Sales and Retailers" sample database to create the report with the burst key.
Follow these steps to complete the technique:
Create a new report in Report Studio. Set the Burst Options and execute at least once. Do not delete the report outputs.
Modify the value of the endpoint variable if you are not using the default gateway:
String endpoint = "http://localhost/crn/cgi-bin/cognos.cgi";
Modify the savePath variable to where the output will be saved:
String savePath = "C:\\temp\\";
Modify the reportName variable to the report that will run:
String reportName = "Banded Report";
Modify the latestVersion variable to true if you want to retrieve the latest version of the report outputs; otherwise, set it to false to retrieve all versions of the report outputs:
boolean latestVersion = true;
Modify the username, password, and namespaceID variables to the correct login information:
String userName = "nameSpaceID";
String passWord = "userName";
String nameSpaceID = "passWord";
Compile and execute the script. Information about the Cognos ReportNet Java Toolkit can be found in Chapter 1 of the ReportNet SDK Getting Started Guide, under the ReportNet Java Toolkit section.
Check from your save path to see if the report outputs are being generated.