Jasper Server Integration with web application

We are implementing a web application. We require jasper report to view at client machine whenever client accesss the server.
Can you suggest how jasperserver will integrate with web application. We are using Eclipse to develop the web application.

Urgent need.

rajesh.majoju's picture
Joined: Feb 8 2014 - 1:57am
Last seen: 6 years 11 months ago

2 Answers:

Hi.. Search for Embeeding BI in jasper community site in WIKI section. You need to call jasper dashboard URL in iframe tags.

Also you need to pass several parameters like viewAsDashboardFrame=true and the username and password from the URL.


sadakar's picture
Joined: Aug 14 2012 - 3:57am
Last seen: 1 month 2 weeks ago

In the past, multiple times, I have created jasper reports integration in web applications in the following manner...

This assumes that you have created your reports with the data source defined in the report definition (i.e. The SQL statement to select data for the report is in the report definition.)

  1. Create database table for storing the following...
    1. Report Definitions
      1. Name
      2. jrxml file name
      3. CLOB containing HTML needed to present form to collect input parameters for report from user
  2. Create a servlet which the reporting UI will use to communicate with the server and jasper reports engine
  3. Create a web page that presents the Report UI
    1. Let user select desired report from list retrieved from above table through the above servlet
    2. On selection of report...
      1. Retrieve the HTML associated with the report from above table through above servlet
      2. Present form retrieved from above table in div
        1. Let user edit the form
      3. Submit the form to the servlet
  4. On the server, compile the jrxml file associated with the selected report
  5. Pump the parameters obtained in the last submit to the servlet into the compiled report
  6. Produce the report using the jasper engine to a .pdf stream
  7. Output that stream to the report UI for display (and possible conversions supported by the report UI)

This approach provides your web application with a single implementation that allows for producing and viewing any or all reports, as well as allowing the user to control the rendering of the report as well (i.e. turn headers on/off).  By presenting the reports in the UI as well, you can also provide buttons for printing and converting to different formats which can be used by all reports.


rodney.barbati's picture
Joined: Jan 5 2017 - 2:47pm
Last seen: 4 years 3 months ago