Jump to content
Changes to the Jaspersoft community edition download ×

problem generating report with same x-axis values


lakshmi_pothana

Recommended Posts

Hi,

 

I am using jasper and iReport for generating reports.

 

I have arraylist object and created datasource object out of it and passed to JasperManager.fillReport().

It generated the report initially. The report generated is dynamic. The X and Y axis values that are part of report are say for example:

Y-Axis values : 1 2 3 4 5

X-Axis values : a b c d e

 

If i use the same x-axis values to generate report for other data, the report is not refreshing and i am displayed with the same report which has data that belong to previous selection.

 

The problem here if we generate the report with same x axis values, the jrxml is unable to recognize it and couldn't generate new image for the same x-axis values.

 

Please suggest a work around solution to this issue?

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Hi,

 

I'm not sure I fully understand what you mean, but I suspect you are actually talking about a report that contains a chart and that is displayed in HTML format tby a parent Web application. It appears that the chart image gets cached by the browser and you see the old chart even if you ran the report again using different data.

If it is the case, then you might consider configuring the HTML exporter image servlet in a way that the images URLs in the generated output are always different.

This can be achieved using a dummy parameter in the image servlet URI that you configure using the JRHtmlExporterParameter.IMAGES_URI.

 

That line could look something like this:

 

Code:

exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, "path_to_image_servlet/image?myDummyParam=my randomValue&image=");

 

You would need to make sure with each call the myRandomValue is different, so that the browser does not cache the chart image.

 

I hope this helps.

Teodor

 

Post edited by: teodord, at: 2007/12/14 16:11

Post edited by: teodord, at: 2007/12/14 16:12

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...