### To Applet

JReport Designer can collaborate with a web server by exporting a report as an applet to a server. After publishing it to the server, you can then retrieve it by accessing the server.

#### Exporting the report results as an Applet to a server

To export the results of a report as an applet to a server, follow the steps below:

1. In JReport Designer, open the report set that contains the report you want to export.
2. On the report tab bar, click the tab that represents the report.
3. Click File > Export To > Applet.
4. In the Enter Server Location dialog, key in the server name and port number in the Server Name of Port text boxes, and then click OK.
5. In the Export to Applet dialog, specify the directory and file name respectively.

   For example, browse to the location where you want to save the file, type exapplet.htm as the file name, and then click Save. The file exapplet.htm and the report result exapplet.rst will then be generated.

#### Viewing the exported result file

Before viewing the exported result file of JReport using a web browser, you first need to make sure that your web server supports applets. Then,

1. Copy the file viewer12.jar in `<se` `rver_install_root>\lib` to the document root directory of the web server.
2. Copy the result file *.rst and *.html generated when exporting to any directory of the web server. For example, copy A.rst and A.html into `<webserver_install_root>\test`.
3. Edit A.html (with a text editor) to make sure that all paths are valid. For example, change:
   - codebase="/" (which refers to the location of viewer12.jar)
   - value="/test/A.rst" (since we copied A.rst in `<webserver_install_root>\test`.)
   - width=800 height=600
4. Run the web browser with the web server to view the results.

Notes:

- Before you can view the results in a web browser, make sure you have enabled Additional Unsigned Permissions for the web browser.

  To enable the option in Internet Explorer:

  1. Open the Internet Explorer, then click Tools > Internet Options.
  2. In the Security tab, click Custom Level, scroll down Settings to set Java Permissions to Custom, click Java Custom Settings.
  3. In the Edit Permissions tab, check Run Unsigned Content.
  4. Click OK to accept the changes.
- JReport Enterprise Server also supports requesting the report result in an applet from a web browser.