I’m working on a Grails application and I need to display some reports and allow the users to export them in the most common formats (PDF, XML…).
I don’t want to embed the SQL query into the report definition, the report logic is integrated into Grails services and the reporting library I’m looking for should work on a dataset (maybe a list of maps) without a real datasource.
I used Jasper Reports and iReport for my tests and they work great together with Grails for the exporting functionality (PDF, XML, HTML). But I have difficult including them into my page template. I would like to have my header, footer, navigation menu and filter within the report html.
The only solution that came in my mind was to use iframe but I don’t like this so much.
Can Jasper Report address my request? do you know any other Java reporting library that allows me to include the report in my HTML body?
You can use the
g:includetag to include a controller’s response:Using the Grails Jasper plugin, your controller then would contain code like this: