problem in creating chart in iReport 2.0.4 help!

0
Every time I try to create a chart in iReport 2.0.4 , I get the following error message after executing:

Error filling print... 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:159) at net.sf.jasperreports.engine.fill.JRFillElementDataset.increment(JRFillElementDataset.java:169) at net.sf.jasperreports.engine.fill.JRCalculator.calculateVariables(JRCalculator.java:152) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:682) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:255) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:113) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:891) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:795) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:63) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:402) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:234) at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:944) at java.lang.Thread.run(Unknown Source)
Print was not filled. Try using an EmptyDataSource...


Does it mean my configurations were wrong (even though the chart needed is very simple) or links with JFreeChart/java something is not working?

{New to iReport...attempting to create a pie-chart with $F{number_of_calls} for each $F{country} ). Without the chart, the iReport is working fine.

Any idea/suggestions would be really fab.
Post edited by: aaston, at: 2008/06/16 22:38
aaston's picture
12
Joined: May 20 2008 - 1:56am
Last seen: 6 years 2 months ago

9 Answers:

0
Could you post your jrxml file?
svenn's picture
1107
Joined: Mar 19 2007 - 5:57am
Last seen: 7 years 4 months ago
0
Sounds like this is a pie chart. Using iReport check out the Chart Properties -> Chart Data -> Details and check the key expression. Make sure the key expression is something that will not return a null. For a test you can put a static string.
lshannon's picture
190
Joined: Feb 2 2007 - 3:54am
Last seen: 4 months 16 hours ago
0
Nail on the head!

Indeed the root seems to be that pie-chart hates NULL things... and I had a NULL country with 346 calls!

Phew.
aaston's picture
12
Joined: May 20 2008 - 1:56am
Last seen: 6 years 2 months ago
0
Nail on the head!

Indeed the root seems to be that pie-chart hates NULL things... and I had a NULL country with 346 calls!

Phew.
aaston's picture
12
Joined: May 20 2008 - 1:56am
Last seen: 6 years 2 months ago
0
Hi There,
If you look atthe NULL key error it looks as if you are missing some informtions in the chart.Say like the key expression, value expression and lable expression. the important part of the chart is to provide it with the key expression and value. How? after inserting the chart icon on you report> right click > click chart properties>click chart data,>click details >on the section value provide the key expression like "$F{Your Contribution}"> value expression almost similar but depends.click okey and run the program.This is an idear it is worth trying and it should help with that error.
Regards
Systemp
systemp's picture
16
Joined: May 1 2008 - 11:14am
Last seen: 6 years 2 months ago
0
Good idea! Thank you!
I was probably just spoilt by other programming softwares who are more forgiving of NULLs...)
aaston's picture
12
Joined: May 20 2008 - 1:56am
Last seen: 6 years 2 months ago
0
Hi!

I'm also experiencing same kind of error. I am using iReport ver 1.3.1.

I also did try to have a string(constant) key expression, but it still give the same errors,.

help.. thanks..
jmjuat29's picture
Joined: Jun 25 2008 - 3:31pm
Last seen: 6 years 4 weeks ago
0
hi!

My program still is not working,, It still gives Null key argument..
what must I do?

pls help..
Thanks
jmjuat29's picture
Joined: Jun 25 2008 - 3:31pm
Last seen: 6 years 4 weeks ago
0

Hi!

I had this problem and I solved it by removing cache and log directories of IReport from it's directory in my home.

You can find the user directory of IReport for storing cache and configurations from the about dialog of Ireport's menubar.Look for "userdir" in the about dialog.if you couldn't find that try to find ".ireport" folder on your file system.

After finding the ".ireport" folder close your IReport and then remove the "cache" and "log" folders under the "dev" directory from the found directory.

 

Regards

Reza Rahimi



Post Edited by Reza Rahimi at 11/18/08 15:06
rezarahimi's picture
Joined: Nov 18 2008 - 6:41am
Last seen: 5 years 8 months ago
Feedback
randomness