|
NextReports embedable engine |
|
You can download a Demo integration archive (contains the demo java code, all jar dependcies, nextreports engine library, nextreports engine javadoc). The examples from here show how to export a Next report in a supported output format : HTML, EXCEL, PDF, CSV, TSV, RTF.
In your applications, running reports generated from NextReports Designer is a very simple process to implement. The following lines are self-explanatory :
FileOutputStream stream = new FileOutputStream("test.html"); FluentReportRunner.report(report) .connectTo(connection) .withQueryTimeout(60) .withParameterValues(createParameterValues()) .formatAs(ReportRunner.HTML_FORMAT) .run(stream);
Practically, the previous code will export the 'report' xml object created by NextReports to a html file (test.html). You specify your java.sql.Connection , a timeout in seconds for query execution , the values for the parameters and the export format.
The parameter values is a java map Map where the key is the name of the parameter and the Object is the value. Such value can be a simple java object if the parameter has SINGLE SELECTION, or in case of MULTIPLE SELECTION value is an array Object[] of java objects. For an empty list of values , the value must be : new Object[]{ParameterUtil.NULL}
We can offer a zip archive with the needed libs, java doc and some simple demo examples. See readme.txt from the zip for more information.
See information about integration here
|