-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hey all!
I've managed to get stumped on an... interesting problem. I'm currently writing an application that will allow a user to select specific date ranges of a single report. This in itself works flawlessly... the first time a report is selected. However, if the user selects a second or third date range, the report parameters will not update, although the report data source updates correctly. For instance:
User logs in selects date range starting May 5 - report populates fine.
User selects a date range starting July 4 - items from report data source populate correctly, data from report parameters are still items from the May 5 report.
Here is a code snippet from the code (we're currently running zk 6.5 PE, but it also happens under 6.0):
@Wire private Jasperreport report; ... @Listen("onClick=#dateListBox") public void loadReport(){ report.setSrc("/Template.jasper"); ReportData reportData = findReportData(); report.setDatasource(new JRBeanCollectionDataSource(reportData.getLineItems())); report.setParameters(reportData.getParams()); report.setType("html"); report.applyProperties();
This is in a java class, so not in a ZSCRIPT tag.
Just in case it matters, here is the code snippet for the jasperreport portion of the .Zul
<jasperreport id="report" width="100%" height="700px" ></jasperreport>
I'm obviously missing something here, but I'm not seeing anything that stands out to me in the Jasperreport API, but maybe the 20,000 eyes of the community will see something I'm not.
I appreciate any thoughts!
Thanks!
Hi,
Can you verify the data returned from the reportData.getParams() are different?
And if possible, please check the report's link in the browser are different too.
Asked: 2012-09-20 19:40:00 +0800
Seen: 115 times
Last updated: Oct 08 '12