• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Passing parameters to Jasper Reports
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Passing parameters to Jasper Reports


  • Subject: Passing parameters to Jasper Reports
  • From: Pascal Robert <email@hidden>
  • Date: Tue, 30 Aug 2011 15:19:46 -0400

Hi,

I have to run some Jasper Reports where the data will come out by a SQL query embedded in the report instead of a JRDatasource. The report I'm working works fine in iReport (well, except the fact that iReport is one of the worst app I ever used) and that report have parameters to change the SQL query. I was under the impression that when you build the parameters map, you can just include the parameter from the report into the map, like this:

    HashMap<String, Object> params = new HashMap<String, Object>();
...
    params.put("studentID", "102449");
    params.put("showAssessmentHistory", false);
...
    JRReportTask reportTask = new JRReportTask(location.id(), fs, report.__globalID(), params);

But where "studentID" and "showAssessmentHistory" are parameters inside the report. But when I execute the report, I get a blank page, even if I do have data for that studentID (using the same values in iReport results with data). Is this the correct way to supply report parameters to the engine?

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Passing parameters to Jasper Reports
      • From: Pascal Robert <email@hidden>
  • Prev by Date: Re: Prevent NEW in D2W?
  • Next by Date: Re: Prevent NEW in D2W?
  • Previous by thread: Slides from my part of the deployment session
  • Next by thread: Re: Passing parameters to Jasper Reports
  • Index(es):
    • Date
    • Thread