• 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
Re: Passing parameters to Jasper Reports
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Passing parameters to Jasper Reports


  • Subject: Re: Passing parameters to Jasper Reports
  • From: Pascal Robert <email@hidden>
  • Date: Wed, 31 Aug 2011 21:21:27 -0400

FYI, problem #1 was that the parameters have to be "isForPrompting="false"". But after that, it was still failing, and this time without any errors but neither with a PDF. Added some breakpoints, and I found out that it was failing when filling up the report (which have multiple sub-reports) but no exception was raised. So I did the same calls but in a non-Callable context, and I got the following error:

  java.lang.ClassNotFoundException: org.codehaus.groovy.control.CompilationFailedException

So the problem is that 3 sub-reports had Groovy as the language for expressions instead of Java. Changed that, and now it works. I just have to find why I don't get the exceptions when in a background task context.

PS: to enable lo4j for JasperReports:

  log4j.logger.net.sf.jasperreports=DEBUG

> 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

References: 
 >Passing parameters to Jasper Reports (From: Pascal Robert <email@hidden>)

  • Prev by Date: Re: Will a 5.3.3 application work on snow leopard server?
  • Previous by thread: Passing parameters to Jasper Reports
  • Next by thread: WOCollapsibleComponentContent broken?
  • Index(es):
    • Date
    • Thread