IBM Cognos Sample Programs

EditReportSpecUI.java - Modify a report.

The Java EditReportSpecUI sample program contains methods to retrieve a list report, add a column, update the report specification and save the updated report back to the content store.


Dependent Files

Associated files are contained under the java sample folder.
Additional files required for running are identified in the CLASSPATH definitions in run.bat file.

How To Run The Sample Program

Double click on the file run.bat.

A window will be opened containing:
    - Report selection dropdown box
    - Edit Report command button
    - URL text box
    - Output Pane

Select a list report using the drop down box and click on the 'Edit Report' button to run the sample program.
Use the Report Wizard window for selecting modifications to the report specification.

Note that the sample works only with list reports, and requires a column for each item in the query.
For example, to modify the report Order Product List, first edit the report in Report Studio to remove Revenue from the query.

The sample has been coded to work with the Go Data Warehouse (query) package.
For example, select the report Order Product List, and from the Product table, add the Product description column.
If you modify this report, however, please update it in Report Studio to remove the extra column and restore Revenue to the query in case other users are referring to this sample. Alternatively, you can use Report Studio to create a simple list report in the package to modify.
To work with another package, you may need to edit the Metadata class to select nodes differently.
(Edit both occurrences of "/ResponseRoot/folder/folder/folder/querySubject")

Expected Results

The specified report will be modified according to your selections in the Report Wizard and saved in the content store.

Documentation

The IBM Cognos Software Development Kit Developer Guide contains additional information about the samples. See the chapter titled 'Methods' and the appendix titled 'Code Samples and Language-Specific Coding Practices'.

Please note that the samples are not intended to be treated as end-user applications. Refer to the sample code for examples of how to use the API when developing your own applications.