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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:31:15+00:00 2026-05-25T09:31:15+00:00

I am trying to learn how to get Jasper running from within a grails

  • 0

I am trying to learn how to get Jasper running from within a grails app using the jasper plugin. On the plugin directory page [ http://grails.org/plugin/jasper ] there is a fairly in-depth tutorial. Which is supposed to show you how to extend a ‘racetrack’ example to use the jasper plugin. The problem I’m finding is that since the ‘registrations.jrxml’ is not shown on the tutorial, nor does it come with the source download of the plugin — its impossible for me to figure out how to setup a jrxml file to work with data being sent to it from grails.

Right now, my application’s controller is sending an ArrayList of HashMaps back to the view, which are then turned into html tables using “g:each”. It’s not a simple representation of a domain, the HashMaps are constructed from several different datasources. I need to also get this data exported through Jasper to an XLS file. Right now I can send the jrxml the ArrayList as a parameter, but I am going nowhere when it comes to correlating each member of the List (a Row) to a Detail in the jrxml.

So for the simplest case say I have a controller that provides a view with an ArrayList of Strings

def index = { 
        def people = ["Donald", "Richard", "Raymond", "Samir", "Cyrus"]

        [people: people, guy: "Frank"]
    }

and a view that passes the ArrayList to Jasper as a parameter.

<g:jasperReport format="PDF" jasper="don2" name="Don Report">
    <input type="hidden" name="name" value="${guy}"/>
    <input type="hidden" name="list" value="${people}"/>
  </g:jasperReport>

What would I need to do in a jrxml to make use of the ArrayList as my datasource?

Don

  • 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-25T09:31:15+00:00Added an answer on May 25, 2026 at 9:31 am

    You need JRBeanCollectionDataSource. Construct that in a controller (or in a custom tag of yours). You can’t do it directly in the gsp.

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

Sidebar

Related Questions

I am trying to learn android app development .I am using IntelliJ Idea 10.When
I am trying to learn how to get all the img src from a
I'm trying to learn how to get an application access token from Facebook for
I copied this from the jquery site. I'm trying to learn how to get
I've been trying to learn about metaclasses in Python. I get the main idea,
I´m trying to learn C#, coming from a Python/PHP background, and I´m trying to
I have been trying to learn assembly for a few years now. I get
I'm trying to learn reg exp, i want to get title of <img only
I've been really trying to learn some SVG. But browsers seem to get in
I am trying to learn JSF and was using JSF 2.0 along with PrimeFaces

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.