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

how to use the AVERAGE function with variables in a list ? (getting errors)


svedec

Recommended Posts

I have a dataset (data over 13 months) and a list, and within that dataset, I want a variable to calculate the average, rather than expanding my query and putting in an extra row with the average in my resultset.

So when I try this, firstly, it seems I have to duplicate my list. I can't for instance, have my 13 months coming from my dataset, and another row at the end of the list, with my variables, like in attachment 1. (item height = 13, list height = 182)
That's a pity, unless I am missing something.

So, ok, I duplicate my list, set the height to 13 (item height as well) and put in my AVG row, like in attachment 2.
But then I get this error :

Error filling print... null
Setting up the file resolver... 
java.lang.NullPointerException 
    at net.sf.jasperreports.engine.fill.JRDoubleAverageIncrementer.increment(JRDoubleIncrementerFactory.java:371) 
 
I've played around with the evaluation time of the text box and reset types of the variables, but to no avail.
What am I missing, can someone help me please ?
Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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