How can an application deployed on Pramati Server use JasperReports?
This document specifies how an application deployed on Pramati Server can use the features of JasperReports. The document bundles with a sample Web application, which uses JasperReports to generate reports.
Which product versions support the application?
The application was tested with the following product versions:
- Jasper Reports 1.1.1
- Pramati Server 4.1 SP3
- JDK 1.4+
Which Libraries are required to be downloaded?
The following external libraries are needed by Jasper in addition to the:
Jasper Libraries
jasperreports-1.1.1.jar
Apache Libraries
iText Library for pdf Generation
How do I setup Server Classpath?
Add the jasperreports-1.1.1.jar to the Server's System classpath (by editing setup.bat) or place the jar in Java's Extension Classpath (jre/lib/ext directory). The other supporting jar's (apache jar's and iText jar) can be present in the web application's WEB-INF/lib or in the Java System classpath (or) Java Extension classpath (jre/lib/ext).
How do I invoke Jasper API from the application?
The usage of JasperReports API from an enterprise application deployed on Pramati Server remains the same as from a standalone java client, which can be found on tutorials section of JasperReports website.
Sample Web application that generates JasperReports
- Download the attached PramatiJasperSample.war
.
- Download all the above mentioned jar's that are needed for JasperReports.
- Add all the jar's in the classpath as mentioned above.
- Deploy the web application on Pramati Server.
- Access the index.jsp.
- Specifying the DataSource Name, you can create needed tables.
- The datasource must be already configured on Pramati Server.
- Clicking on the generate reports button, html or pdf reports can be generated.
References
|