## Working with reports in JReport Portlet

When reports are published to JReport Portlet, you can then run them and perform actions like sorting, filtering, drilling, etc to the reports according to your requirements just as you do on JReport Enterprise Server.

### Running reports

To run a report in JReport Portlet:

1. Open JReport Portlet on the portal server.
2. In the Select Report window, select the report you want to run from the report list.

3. Click OK. If the report has parameters, you will be asked to specify the parameter values. Enter the parameter values as required and then click Submit.

Note that, in the report list, only the reports that are published to the My Reports folder on the JReport Webservice Server are listed. So if your reports are published to the Public Reports folder, to make them available in the list, click Customize Report List button in the Select Report window, then add the reports from the Public Portlet Reports box to the My Portlet Reports box.

In the Select Report window, you can also rename the reports, or remove any report that is not required according to your requirements.

- To rename a report, select the report from the report list, click the Rename Report button , then give a new name for the report in the Rename Report dialog as required. Or, you can just double-click the report row to rename it.
- To remove a report, select the report you from the report list, then click the Remove Report button .

### Working with reports

When a report finishes running and is displayed in the JReport Portlet window, the following toolbar commands are available in the window for you to work with:

Open

Opens another report in the window.

Rerun

Reruns the report to refresh the report data.

Export Excel

Exports the report result to Excel format.

Export PDF

Exports the report result to PDF format.

Sort

Sorts the report data in ascending or descending order on the field(s) you select.

Filter

Filters the report data according to the filter criteria you specify.

<Select a chart type>

For a chart report, you can change its chart type by selecting another type from the drop-down list.

Page navigation

If a report contains several pages, you can click the page number and the arrow buttons to navigate through the report pages.

Besides the above operations, you can also drill the data in a crosstab into other dimensions, go to the details of a group in a report, and link to another report or a detail report, so as to make the analysis of a report more diverse and useful.

For details about the operations, refer to the specific topics in JReport Web - Interactive Reports.

Tip: The JReport Portlet window for each report can be customized according to your requirements. To do this, In the report display window, click the Preferences button , then specify the window title and the toolbar commands that you want to display in the JReport Portlet window for the report.

Note: WebSphere portal server does not support dynamic portlet title by default. In order to use a dynamic portlet title on WebSphere, you need to modify `<WebSphere Portal Profile>\installedApps\<Node>\wps.ear\wps.war\skins\html\IBM\control.jsp`:

1. Change

   `<portal-skin:portletTitle>
   <portal-fmt:problem bundle="nls.problem"/>
   </portal-skin:portletTitle>`

   to

   `<span id="title.<portal-skin:portletID/>">
   <portal-skin:portletTitle>
   <portal-fmt:problem bundle="nls.problem"/>
   </portal-skin:portletTitle>
   </span>`

2. Add the following code at the end of control.jsp:

   `<script type="text/javascript">
   var dynamicTitle = "<%=request.getAttribute(com.ibm.portal.portlet.Constants.DYNAMIC_TITLE)%>";
   var titleElement = document.getElementById("title.<portal-skin:portletID/>");
   if (titleElement != null) {
   if (dynamicTitle != "" && dynamicTitle != "null")
   titleElement.innerHTML = dynamicTitle;
   }
   </script>`

For more, see http://www.ibm.com/developerworks/websphere/library/techarticles/0612_rick/0612_rick.html.