IBM Cognos Sample Programs

EmailUI.java - Emails a report.

The Java EmailUI sample program contains methods that execute a report and send it to a particular user or contact list members.


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:
    - Sample Option selection dropdown box
    - Report selection dropdown box
    - Email command button
    - URL text box
    - Output Pane

Select a sample option from the drop down box, select a report, and click on the 'Email' button to run the sample program.

Expected Results

When the 'Email Selected User' option is selected, the user is prompted to type in a valid email address for the email. When the 'Email' command button is clicked on this form, the program executes the selected report and sends the output to the email address that was provided.

When the 'Email All Contacts' option is selected, and the 'Email' command button is clicked, the program executes the selected report and sends the output to all contact members.

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.