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 Server.
To run a report in JReport Portlet:
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.
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 fields 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 Viewer - 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
:
<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>
<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.