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      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to