Project

General

Profile

Servoy JasperReports Plugin v320 - Release Notes

We are pleased to announce the availability of the new Servoy JasperReports Plugin, version 3.2.0.
The new dropins and the viewer bean have been added to the files section for downloading.

The current release includes and provides:
- compatibility with JasperReports version 4.0.0 [feature request]
- a JasperReports Viewer Bean [feature request]

Fixes:
- subreports not working with foundset based report (server-client scenario) [issue 261, issue 247]
- other bugs and fixes

In what follows we are just mentioning a few usage notes regarding the bean usage and the fix on subreports for foundset based reports.

The Servoy JasperReports Viewer Bean is available as a separate file and should be added to the /application_server/beans directory of your Servoy install. Please do note that for the bean to work you must also have the Servoy JasperReports plugin in your plugin's directory.
It is usable like other beans; please refer to its properties and scriptable functions for more usage details for each one.
It's main functionality is the including of a JasperReports Viewer inside a Servoy Bean. This main function is called showReport. It works just like the plugin's runReport(...,'view',...) call and the corresponding report will be displayed in a JasperReports Viewer inside a Bean. Sample code has been provided in the bean for showReport.
The bean works for classic SQL-based reports scenario and also for the foundset-based scenario. Moreover, it works in all scenarios that the plugin works, to be more specific and as we said before, just like a runReport call to 'view' exporting works.
A simple call looks like this forms.my_form.elements.jrbean.showReport(datasource,'/report.jrxml' ,params).
The bean currently works only in Smart Client.

The subreporting capabilities of JasperReports are now also compatible with our plugin in the foundset based reporting scenario.
In this scenario, for a report to use a subreport which is located on the server, a call to a newly added function JasperReportsResourceLoader.loadReport should be included in the subreportExpression as follows (in the main report jrxml code):

<subreport>
   <dataSourceExpression><![CDATA[$F{customers_to_orders}]]></dataSourceExpression>
   <subreportExpression class="net.sf.jasperreports.engine.JasperReport"><![CDATA[com.servoy.plugins.jasperreports.JasperReportsResourceLoader.loadReport($P{SUBREPORT_DIR} + "subreport1_fs.jasper")]]></subreportExpression>
</subreport>

where customers_to_orders is a Servoy defined relation, specified as the datasource (to the runReport call on the main report) and a field of type net.sf.jasperreports.engine.JRDataSource. Please note that the subreport expression class is of type net.sf.jasperreports.engine.JasperReport. The SUBREPORT_DIR parameter is specified for the runReport call, from Servoy.

Thank you for all your feedback and support. Have fun using testing and await your feedback.

Best regards,
Andrei