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 8202445
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T07:11:12+00:00 2026-06-07T07:11:12+00:00

I am using grails and I have this Jasper report with a subreport in

  • 0

I am using grails and I have this Jasper report with a subreport in it.
Having this simple two jasper reports

Note: Only .jrxml is the file extension of the files inside the /web-app/reports

Main Report [main_report][subreport area]

<subreport>
   <reportElement x="0" y="0" width="555" height="157"/>
   <subreportExpression>
      <![CDATA[$P{SUBREPORT_DIR} + "test_report.jasper"]]>
   </subreportExpression>
</subreport>

Test report [test_report][title.band]

<staticText>
   <reportElement x="203" y="30" width="154" height="34"/>
   <textElement/>
   <text><![CDATA[Hello World]]></text>
</staticText>

And looking in the view or the gsp file I have this command

<g:jasperReport jasper="main_report"
                format="pdf, html"
                delimiter=" "/>

When I want to view the report in either PDF of HTML format, the report returns a blank page. Am I missing something to display the main_report properly with a subreport test_report.

  • 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-06-07T07:11:14+00:00Added an answer on June 7, 2026 at 7:11 am

    You need to:

    1. Make sure the sub-report is compiled (do this in iReport), i.e. there should be a .jasper file for sub report in reports dir.
    2. Set the SUBREPORT_DIR parameter before generating the report, e.g.

    params.SUBREPORT_DIR = servletContext.getRealPath('/reports') + "/"

    (assuming the compiled subreport is in the <app>/web-app/reports directory, the same as the uncompiled reports).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this problem regarding my Jasper Report on Grails wherein I should display
I'm using Grails 1.3.7 and the db-migration plug-in. I have generated a chagelog.groovy-file containing
I'm using the Grails Jasper report plugin in my application. Im trying to bind
We are using grails-groovy with Hibernate, I have a SQL query like this in
Problem with german umlauts in generated CSV file using Grails Hi, I have a
I'm using Grails 1.2.1. I have this method in my controller … class SocialMediaCacheProxyController
I'm using Grails 1.2.1. I have a class in my src/groovy file in which
I'm using Grails 1.3.2 in NetBeans. I have a very simple unit test that
I am using groovy-grails with jasper reports to develop an app. I need to
I have this domain model, grails-app/domain , named com.portal.Schedule.groovy having this properties: Subject subject

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.