nao921 Posted March 1, 2010 Share Posted March 1, 2010 I have a report that contains a pie chart within it. I would want the chart to be shown no matter if the query returns results or nothing at all. typically you just need to do the plot.setNoDataMessage() function, however since this is not exposed within iReport, i did it within the Customizer class (attached code)however when i run it with no data returning, it is giving me a blank page and iReport pops up with "the document has no pages"Please advise.Code:CategoryPlot plot = (CategoryPlot)chart.getPlot(); plot.setNoDataMessage("No data available so we go into this really " + "long spiel about what that means and it runs off the end of the " + "line but what can you do about that!"); Link to comment Share on other sites More sharing options...
mdahlman Posted March 3, 2010 Share Posted March 3, 2010 nao921,Your customizer is probably correct (I did not read it). You are not getting to it because the report is set to display nothing when there is no data. At the root report level find the property "When No Data". Try setting it to "All Sections, No Detail".Regards,Matt Link to comment Share on other sites More sharing options...
nao921 Posted March 4, 2010 Author Share Posted March 4, 2010 great! exactly what i missed on! thank you very much madhlman! 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