Jump to content

"Null range specified" Exception in ireport


Recommended Posts

Hi All,

           I am using ireport tool to generate jrxml's.I am using these jrxmls in my java application to generate reports.While generating report from my application i am getting the following exception.


java.lang.IllegalArgumentException: Null range specified
 at javax.print.attribute.standard.PageRanges.<init>(PageRanges.java:190)
 at net.sf.jasperreports.engine.export.JRPrintServiceExporter.exportReport(JRPrintServiceExporter.java:224)
 at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
 at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
 at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
 at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)

Can u please help me to fix this issue.





Link to comment
Share on other sites

  • 3 years later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

The exception is being generated as there is no data in the report to print. Its being caused by the "When No Data" property set in the Active Clients by Month.jrxml report template. This is currently set to "No Pages" - when there is no data, jasper doesn't generate any pages for the report. Attempting to print the report fails as it tries to print page 1, which doesn't exist when there is no data.
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...