'sum according to field condition

can you please help me with this on crystal reports.

|field1 | field2 |field3 | |-----------|-----------|-------| |code1 | abc | 12.00 | |code2 | xyz | 11:00 | |code3 | cde | 12.00 | |code4 | yabc | 2.00 | |code5 | xabc | 2.00 | |code6 | xxyzx | 3.00 | |code7 | fgfgf | 43.00 | code8 and so on....

i want to add all contains "abc", "xyz", and so on and if not just show the same name as above.

result should be something like: |-----|------| |ABC | 16.00| |XYZ | 14.00| |code3| 12.00| |code7| 43.00| code8 and so on...

note: included on the quotation will not be included in the required result

im still a newbie on crystal reports..

thank you in advance grace



Solution 1:[1]

Create an IF Then Else formula that returns the value if the condition is true and 0 otherwise. Then, SUM that formula at whatever level of aggregation (Report-level or Group-level) you need.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 MilletSoftware