Passing parameters to Jasper Reports
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