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

Category Series Name Is Null


kflows00

Recommended Posts

I'm trying to add a chart to a report, and I keep getting this error:

 

Error filling print... Category series name is null.
net.sf.jasperreports.engine.JRRuntimeException: Category series name is null.      at net.sf.jasperreports.charts.fill.JRFillCategoryDataset.customIncrement(JRFillCategoryDataset.java:144)      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:652)      at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:232)      at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:113)      at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:767)      at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:690)      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:893)      at java.lang.Thread.run(Unknown Source)

 

What does "Category series name is null" mean? What is the category series? I've been trying to make this one work for a little while and I just can't seem to figure it out. I get the same error whether I run with an empty datasource or with real data. Any help would be appreciated.

Link to comment
Share on other sites

  • Replies 10
  • Created
  • Last Reply

Top Posters In This Topic

In general you have three "objects" to configure in your chart and to map to the result fields of your Query :

- one Category parameter

- one Serie parameter

- one Value parameter

In your case one or more of these seem to be null. Check your query outside iReport to verify that you don't get null values

Link to comment
Share on other sites

I have verified that the SQL query used to fill the report does not contain any null data, but still having this error. I had assumed that the error does not have anything to do with the data itself, though, because I get the same error when running the report with an empty datasource. Is that a bad assumption to make?
Link to comment
Share on other sites

I think that your assumption is right . In this case, it would mean that the input data for your chart are not those returned by the query. Perhaps a problem in the mapping of these data?

It's difficult to say : if you post your jrxml file on the forum, perhaps other people or me could see what is wrong.

Link to comment
Share on other sites

As far as I can tell the data is being passed correctly...its being passed the same way as it is on other reports, and when I run the stored procedure directly in SQL Management Studio the data looks just fine.
Link to comment
Share on other sites

As I used a lot of charts without problems about data, except from my own, I am convinced that, if the chart says "null serie value", it is why it receives a null value.

To be sure that it cannot receive null values from the query, I would do the following :

replace each field in the query ("SELECT Field1 from ......) by an expression : SELECT case when Field1 is not null then Field1 else 0 end from ......

( or SELECT case when Field1 is not null then Field1 else 'AAA' end from ...... if Field1 is a string)

If you still get the same error it's an error in the mapping of input data or a bug in the chart

Link to comment
Share on other sites

  • 1 year later...

I am having an issue with Time Series Chart. I am getting the following error:

net.sf.jasperreports.engine.JRRuntimeException: Time series name is null.

My chart is a subreport that sits in Summary band.

I don't understand what it means that the name is null. What sii the "name"?

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