Reset Parameters on Jasperreport Component

asked 2012-09-20 19:40:00 +0800

kryselmire gravatar image kryselmire
19 2

updated 2012-09-20 21:14:19 +0800

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):

private Jasperreport report;

	public void loadReport(){

	ReportData reportData = findReportData();
	report.setDatasource(new JRBeanCollectionDataSource(reportData.getLineItems()));

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!


delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2012-10-08 09:43:44 +0800

jumperchen gravatar image jumperchen
3909 2 8
http://jumperchen.blogspo... ZK Team


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.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools




Asked: 2012-09-20 19:40:00 +0800

Seen: 115 times

Last updated: Oct 08 '12

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More