Jump to content
JasperReports Library 7.0 is now available ×

While loading charts


subbareddy

Recommended Posts

Hi all,

I am new to reports.while working with charts i am getting this exception. i am using java code for source. Plz send me how to work with charts and related information..

Thanks and regards

Subba Reddy

 

Null 'key' argument.

java.lang.IllegalArgumentException: Null 'key' argument. at org.jfree.data.DefaultKeyedValues.setValue(DefaultKeyedValues.java:225) at org.jfree.data.general.DefaultPieDataset.setValue(DefaultPieDataset.java:187) at net.sf.jasperreports.charts.fill.JRFillPieDataset.customIncrement(JRFillPieDataset.java:158) at net.sf.jasperreports.engine.fill.JRFillElementDataset.increment(JRFillElementDataset.java:169) at net.sf.jasperreports.engine.fill.JRCalculator.calculateVariables(JRCalculator.java:154) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:621) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:228) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:128) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:758) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:685) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:89) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:601) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:517) at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:723) at java.lang.Thread.run(Thread.java:595)

Print not filled. Try to use an EmptyDataSource...!

[file name=Sample-cfcb60dc6fe9266f817aa93e8e27373e.jrxml size=3694]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/Sample-cfcb60dc6fe9266f817aa93e8e27373e.jrxml[/file]

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi,

 

The exception message tells you exactly what is wrong.

You cannot add null values to the chart dataset and apparently one of the keys you try to put there in the pie chart is null. You should filter them out, probably by using the <filterExpression> of the dataset.

 

No wonder the keys are null if you use the empty data source implementation where all fields are null.

 

I hope this helps.

Teodor

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