Jump to content
Changes to the Jaspersoft community edition download ×

count different numbers


pelmenipeter

Recommended Posts

Hallo,

 

i´m searching for 2 days of a solution.

I have a integer field called $F{REJECT}

Then a variable called $V{REJECT_1} This variable should count how often the number 3 exist in $F{REJECT}

I could count all numbers but i dont know how to count only the number "3".

Please help.

Thanks in advance.

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

hello,

thanks for your answers but i have found the correct expression, but i´m not @ work, so i´ll post the code on monday.

But i have the problem, that i couldn´t set a field from an xml file to integer. I have this problem in version 3.1.4 and in 3.5. If i set the field to integer in version 2.0.5 the report works.

In the two older versions i´ve tested, i get an NullPointerException. I dont know why. I have to set the field to string an it works, but the string isn´t usefull.

Code:
Here is the code for count the number 0 in the field USAGE($V{USAGE}.intValue()==0?"":null)

Post Edited by Peter König at 03/30/09 05:17
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...