Illustrative examples of using the Desktop Viewer Bean

You are provided with file sample programs TestClientViewer.java, TestDirectViewerExport.java, TestRunViewerExport.java, TestRunViewerWherePortion.java, and TestDirectViewer.java in <install_root>\help\samples\APIClient\ViewerBean, which illustrate how to use JReport Desktop Viewer Bean.

If you want the full GUI interface to browse and run reports look at TestClientViewer.java. If you want to have the application pick specific reports to run and the user views them look at TestDirectViewer.java. The others provide different variations of this to modify parameters and where portions.

To compile and run the sample programs:

  1. Launch JReport Server that is of the same version as that of the Desktop Viewer Bean.
  2. Pass the parameters such as the server host name, port number and catalog file by modifying the sample programs according to your requirements.
  3. Compile and run the sample programs. You can use either <server_install_root>\lib\JRViewer.jar or <viewer_install_root>\lib\JREntViewer.jar. In addition you need at least log4j-1.2.8.jar in your class path.