Beth S
asked on
sum String field values of 0 and 1 in Crystal Reports
I have four fields that are all 144 char in length and data type is String. The value is either 0 or 1 with no separating characters or spaces, and I want to sum the string. Data example is:
00000000000000000000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000111111 1111111111 1111111111 1111111111 1111111111 11111111
Thank you in advance for your assistance!
BethS
00000000000000000000000000
Thank you in advance for your assistance!
BethS
ASKER
To clarify, I want to sum all the "1" values. For example, the value I would like to be calculated from my data example above would be "54" as there are fifty four instances of the number 1.
What reporting tool are you using?
mlmcc
mlmcc
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Method 2 did the job! Thank you so much for answering my question and helping me learn! :)
If you just want to concatenate all data you can add a new filed that contains the value from all these 4 fields combined together.