Jump to content
JasperReports Library 7.0 is now available ×

Chart, AllSectionsNoDetail, & no data = error


Recommended Posts

By: David Karnowski - karnowski

Chart, AllSectionsNoDetail, & no data = error

2005-11-11 09:42

It appears to me that if you have:

 

1) whenNoDataType="AllSectionsNoDetail"

2) a piechart in a band other than "detail", regardless of the key (even if you fix it as something that never is null: "test" say)

3) a report query that returns no data

 

that the report will fail with a:

java.lang.IllegalArgumentException: Null 'key' argument.

 

I've only tested this with PieCharts, but assume that it probably happens with others as well.

 

The workaround is to set the printWhenExpression to be something that will only be true if at least one row is returned. This workaround is OK, but is something that developers will regularly forget to do and may not become apparent until it's too late. So I request that some logic is put in place so that this error does not occur (perhaps the charts are just not displayed) when no data is returned from the report's query.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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...