Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3490152
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T11:28:53+00:00 2026-05-18T11:28:53+00:00

I’m working on a Grails application and I need to display some reports and

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T11:28:54+00:00Added an answer on May 18, 2026 at 11:28 am

    You can use the g:include tag to include a controller’s response:

    <g:include controller="myJasper" action="showReport" 
        params="[foo: 'bar', baz: 42]" />
    

    Using the Grails Jasper plugin, your controller then would contain code like this:

    import org.codehaus.groovy.grails.plugins.jasper.JasperExportFormat;
    import org.codehaus.groovy.grails.plugins.jasper.JasperReportDef;
    
    class MyJasperController {
        def jasperService
    
        def showReport = {
            def reportDef = new JasperReportDef(
                name: 'your_report.jasper', 
                parameters: params,
                fileFormat: JasperExportFormat.HTML_FORMAT)
    
            def report = jasperService.generateReport(reportDef)
                .toByteArray().toString("UTF-8")
    
            render report
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my XML file chapters tag has more chapter tag.i need to display chapters
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
Configuring TinyMCE to allow for tags, based on a customer requirement. My config is
I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I need a function that will clean a strings' special characters. I do NOT
I have thousands of HTML files to process using Groovy/Java and I need to
I would like my Web page http://www.gmarks.org/math_in_e-mail.txt on my Apache 2.2.14 server to display

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.