Jump to content
We've recently updated our Privacy Statement, available here ×

problem in creating chart in iReport 2.0.4 help!


aaston

Recommended Posts

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

  • Replies 9
  • Created
  • Last Reply

Top Posters In This Topic

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

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

Link to comment
Share on other sites

  • 4 months later...

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