al_ryder Posted May 20, 2010 Share Posted May 20, 2010 Hi,I was wondering if there was a workaround for the fact that for some charts when the query associated with them returns null, the rendering of the chart dies. i.e. I have a report with a Area Chart and the whole report dies because the chart sometimes get passed null data:java.lang.IllegalArgumentException: Null 'dataset' argument. at org.jfree.data.general.DatasetUtilities.findStackedRangeBounds(DatasetUtilities.java:1364) at org.jfree.data.general.DatasetUtilities.findStackedRangeBounds(DatasetUtilities.java:1349) at org.jfree.chart.renderer.category.StackedAreaRenderer.findRangeBounds(StackedAreaRenderer.java:171) at org.jfree.chart.plot.CategoryPlot.getDataRange(CategoryPlot.java:3897) at org.jfree.chart.axis.NumberAxis.autoAdjustRange(NumberAxis.java:428) at org.jfree.chart.axis.NumberAxis.configure(NumberAxis.java:411) at org.jfree.chart.axis.Axis.setPlot(Axis.java:964) at org.jfree.chart.plot.CategoryPlot.(CategoryPlot.java:542) at org.jfree.chart.ChartFactory.createStackedAreaChart(ChartFactory.java:1185) ThanksAl Post Edited by al_ryder at 05/20/2010 00:59 Link to comment Share on other sites More sharing options...
lucianc Posted June 3, 2010 Share Posted June 3, 2010 On which band is your chart placed? Does it use a subdataset?On some cases, there might be ways to address this. For a general solution, log a bug/feature request on the JasperReports project trackers.Regards,Lucian Link to comment Share on other sites More sharing options...
al_ryder Posted June 3, 2010 Author Share Posted June 3, 2010 thanks Lucian, we just did a work around. Checked to see if any data returned from SQL, if none then just populated the chart dataset with a default value. Link to comment Share on other sites More sharing options...
mauricio Posted June 13, 2013 Share Posted June 13, 2013 Hello I have same problem. My chart is placed on a group header band and yes, it uses a subdataset. In fact report has many subdatasets an many charts placed on group header bands. Please I welcome any advice, thanks. EDIT: sorry my error. it works now. no error message Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now