# Publishing Resources

JReport Designer is a report design tool. Developed report sets are saved as .cls files for running in distributed environments. You can publish your resources from JReport Designer to your machine or to JReport Enterprise Server.

- Publishing resources locally
- Publishing resources remotely

## Publishing resources locally

JReport Designer supports publishing resources locally. That is, publishing resources to any directory on your machine or across your intranet. To do this, follow the steps below:

1. In JReport Designer, click File > Publish To > Local Directory to bring up the Publish to Local Directory dialog. See the dialog.

2. Click the Browse button to select a catalog, or type the catalog name with its full path directly into the From Catalog text box, and then press Enter to specify the catalog. All the report sets in the specified catalog will then be displayed in the Select Report Set box.
3. Select the report sets that you want to publish from the Select Report Set box and click the arrow button to add them to the box on the right, or directly drag the reports you want to publish from the Select Report Set box to the box on the right. If no report set is selected here, only the catalog will be published.
4. Specify a directory for the catalog and report sets that are to be published.

   Click the Browse button to the right of the To Local Directory text box, and locate a directory in the Get Directory dialog. Or you can type a directory in the text box directly. If you type in a directory which does not exist, JReport Designer will automatically create it for you.

5. Click Next to view or modify properties of the data source connection.

   First, select a data source from the Catalog Data Source drop-down list, and then the connection properties of the selected data source will be displayed. If the selected data source is built on a JDBC connection, you can click the Modify button to modify properties of the data source connection in the Get JDBC Connection Information dialog.

6. Click the Finish button to publish the catalog and report sets.

## Publishing resources remotely

To publish your resources to JReport Enterprise Server, follow the steps below:

1. In JReport Designer, click File > Publish To > JReport Enterprise Server.
2. In the Connect to JReport Enterpriser Server dialog, fill in the information as required. See the dialog.

   1. Type in the host of the remote web server in the Host text field.
   2. Type in the port of the server in the Port text field.
   3. Enter /jrserver in the Servlet Path text field. You should use /jrserver in the URL to access the servlet, because JSP has been enabled as default.
   4. If the server has been integrated with another web server that supports SSL, you can select the SSL (Security Socket Layer) checkbox to create an SSL connection.
   5. Check Remember connection information to enable JReport Designer to remember the connection information, and then provide the user name and password of the server.
   6. Click Connect.

   The Publish to JReport Enterprise Server dialog appears. See the dialog.

3. Click the Browse button next to the Publish Resource From text field to find the directory where your resources are located, and the resources in the specified directory will be loaded automatically. If you choose to type in the directory in the text field directly, you need to press Enter on the keyboard to load the resources in that directory.
4. In the resource tree panel, check the checkboxes in front of the resources that you want to publish.
5. In the Publish Resource To text field, specify the folder on the server where the resources are to be published. Use the default location (the My Reports node in the server resource tree) or click the Browse button to specify a location on the server.

   Note: If you want to publish the resources to a double-byte-character folder in the server, add `-Djreport.url.encoding="UTF-8"` to JReport.bat/JReport.sh in `<install_root>\bin`.

6. Select a to-be-published resource in the resource tree panel and then click the More Options button to set properties for the resource.
7. In the Properties tab,
   1. In the Resource Node Name text field, specify a name to be displayed in the server resource tree for the resource. You can type a name in the text field or click the Browse button to select a resource name from the Select Resource Name dialog, where all resource names of the same type as the selected resource, which are contained in the Publish Resource To path, are displayed.
   2. In the Resource Description text box, type a brief description to describe the resource.
   3. If a folder is selected, type a real path in the Resource Real Path text field. If no path is specified, default path will be used.
   4. If you are publishing a folder in a cluster environment, make sure to check the Map Shared Disk option. The folder will then be mapped instead of being copied.
   5. Check Apply Archive Policy to apply an archive policy to the resource.
8. In the Permissions tab, check the Enable Setting Permissions option to specify permissions for the selected resource (this tab is available only when you have specified to publish the resources to the Public Reports folder on the server).
9. If the selected resource is a catalog, the Connection tab will be activated. You can view and modify properties of the selected data source connection as required.

   First, select a data source from the Catalog Data Source drop-down list, and then the connection properties of the selected data source will be displayed. If the selected data source is built on a JDBC connection, you can click the Modify button to modify properties of the data source connection in the Get JDBC Connection Information dialog.

10. Repeat steps 6 - 9 to set properties for other resources as required.
11. Click the Submit button to publish the resources to the server. If the resources that you are publishing contain reports that use style groups or have special fonts, a dialog named Publish Font and Style will be displayed for you to specify them.

See also Publish to JReport Enterprise Server dialog for details about options in the dialog.

Notes:

- If you have made some changes to the to-be-published resources, but haven't saved them, before publishing starts, JReport will save the changes automatically to ensure the resources published to the server are the latest.
- After resources have been published to JReport Enterprise Server, you may find that the publish time shown on the server UI is different from the client time. That is because the publish time takes the server time instead of the client time.