Re: Passing parameters to Jasper Reports
Re: Passing parameters to Jasper Reports
- Subject: Re: Passing parameters to Jasper Reports
- From: Kieran Kelleher <email@hidden>
- Date: Thu, 01 Sep 2011 07:22:37 -0400
Is the Callable task being executed by a CCAjaxLongResponsePage?
Regards, Kieran.
(Sent from my iPhone)
On Aug 31, 2011, at 9:21 PM, Pascal Robert <email@hidden> wrote:
> 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
_______________________________________________
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