aaston Posted June 17, 2008 Share Posted June 17, 2008 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 Link to comment Share on other sites More sharing options...
svenn Posted June 17, 2008 Share Posted June 17, 2008 Could you post your jrxml file? Link to comment Share on other sites More sharing options...
lshannon Posted June 18, 2008 Share Posted June 18, 2008 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. Link to comment Share on other sites More sharing options...
aaston Posted June 18, 2008 Author Share Posted June 18, 2008 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. Link to comment Share on other sites More sharing options...
aaston Posted June 18, 2008 Author Share Posted June 18, 2008 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. Link to comment Share on other sites More sharing options...
systemp Posted June 18, 2008 Share Posted June 18, 2008 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.RegardsSystemp Link to comment Share on other sites More sharing options...
aaston Posted June 20, 2008 Author Share Posted June 20, 2008 Good idea! Thank you!I was probably just spoilt by other programming softwares who are more forgiving of NULLs...) Link to comment Share on other sites More sharing options...
jmjuat29 Posted June 27, 2008 Share Posted June 27, 2008 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.. Link to comment Share on other sites More sharing options...
jmjuat29 Posted June 30, 2008 Share Posted June 30, 2008 hi! My program still is not working,, It still gives Null key argument..what must I do? pls help.. Thanks Link to comment Share on other sites More sharing options...
rrahimi Posted November 18, 2008 Share Posted November 18, 2008 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. RegardsReza RahimiPost Edited by Reza Rahimi at 11/18/08 15:06 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