Preparing the web service for JReport Portlet

Before you can deploy JReport Portlet to any portal server, your JReport Server should have been deployed to an application server. You can refer to Deploying JReport Server to a Java application server for details about the deploying procedure. However, the JReport Server WAR file jreport.war used in the deployment should be packaged using the following command in this case (here it is assumed JReport Server is installed to C:\JReport\Server):

C:\JReport\Server\bin\makewar buildWar4WS

Also, the reports you want to run in JReport Portlet should also be published to the JReport Webservice Server, in advance, so that they can be loaded to the corresponding folder in JReport Portlet automatically.

Assume that:

Note: If you want to use the demo reports JReport provides in JReport Portlet, before deploying jreport.war to the web server, you need to add mysql-connector-java-5.x-bin.jar into \WEB-INF\lib, this is because the JReport demo portlet reports are based on MySQL database. You can get the database driver from PR_Resources.zip which is available in <server_install_root>\Demo\PortletReports.

To publish the demo reports to the JReport Webservice Server:

  1. Start the application server in which JReport Server is deployed.
  2. Open a web browser and set the URL to http://<hostname>:<webserver_port>/jreport to access the JReport Webservice Server.
  3. Open the My Reports/Public Reports folder, then click Publish > To Local Server on the task bar.
  4. In the Publish to Local Server page, click the Browse button next to the From Folder field to select the folder C:\PortalDemo where the portlet reports are saved.
  5. Click the Browse button next to Font Directory, and then browse to select C:\PortalDemo\font.
  6. Click the Browse button next to Style Directory, and then browse to select C:\PortalDemo\style.
  7. Specify a name in the Resource Node Name box. This name is required and is used as the display name of the resource in the server resource tree.
  8. Click OK to publish the resources. Upon finishing, you will find a new folder of the specified resource node name is added in the My Reports/Public Reports folder with the portlet reports.

After the portlet reports are published to the My Reports/Public Reports folder in the JReport Webservice Server, they will also be automatically loaded to the My Portlet Reports/Public Portlet Reports folder in JReport Portlet.

Reference: You can refer to Publishing resources for more detailed instruction about the publishing steps.