How can I count or sum different strings

0

Hi all,

I wonder how to count different values.

Example output of the table in the group band:

Row 1:

  1. Cat 1: 4
  2. Cat 2: 3
  3. Cat 3: 3

Row 2:

  1. Cat 1: 1
  2. Cat 2: 2
  3. Cat 3: 1

Then I want to put the total in the last page footer: 14

Note: There could alse be 3 rows, or 4.

Thanks in advance for any help / insights.

Jason30's picture
Joined: Feb 9 2017 - 4:57am
Last seen: 3 days 18 min ago

1 Answer:

0

You need to be more specific and clear on this. 
Is the value "1. Cat 1:1" the whole value a string or are they broken up in 4 columns. 

At end of day you would need to create a variable and use the calculation function to count of sum. 
Then depending on how you want to count or sum, you need to create group and use the correct bands. 
Then you need to select the increment type and Reset type. 
Can also create multiple variables with different groupings, increment types and Reset types and then count sum these together. 

If you want to use the last value in your   "1. Cat 1:1" value, you can use subring methods to get last value and then convert the value to integer and then count or sum. 
One can also create REgex jar custom, so you can use a regex methods to get the required value, then convert type, then count or sum.
Many ways, it just depends on how you want to do it. 

joseng62's picture
188
Joined: Dec 5 2014 - 2:43am
Last seen: 57 min 28 sec ago
Feedback
randomness