Gabriell Porto
asked on
How to summarize a formula field within a group except suppressed (dupplicate) values
Hello!
I am trying to summarize values within a group, but only values that are not suppressed.
I am suppressing the values that are dupplicate in that group.
Can't figure what to do next.
Need help!
I am trying to summarize values within a group, but only values that are not suppressed.
I am suppressing the values that are dupplicate in that group.
Can't figure what to do next.
Need help!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I'm gonna try to explain in a better way.
In the report there are several groups, one of them is called CLIENTS. I want to sum a particular field that is set to suppress if there are dupplicated values in the group.
I'm suppressing this way: Format Field > Common > Suppress if duplicated checkbox.
Whenever I generate the report, I want it to summarize every value of this particular field that it's not suppressed.
In the report there are several groups, one of them is called CLIENTS. I want to sum a particular field that is set to suppress if there are dupplicated values in the group.
I'm suppressing this way: Format Field > Common > Suppress if duplicated checkbox.
Whenever I generate the report, I want it to summarize every value of this particular field that it's not suppressed.
Did you try either method?
There is no way to determine that the field is suppressed since you used that method. By definition it is suppressed if it matches the previous value
mlmcc
There is no way to determine that the field is suppressed since you used that method. By definition it is suppressed if it matches the previous value
mlmcc
I just built a report and the formula method works. The running total works except if the last value of a group matches the first value in the next group.
mlmcc
mlmcc
ASKER
I just didn't understand the "In the detail section add a formula to calculate the total" part.
How/Where do I input that?
Sorry, it's my first time messing around Crystal Reports.
How/Where do I input that?
Sorry, it's my first time messing around Crystal Reports.
IN the field explorer there is a branch for FORMUAS
Right click it and click NEW
Put the name in and formula editor will open
Enter just as I have them written. Only change the Calculate one to use your actual field.
mlmcc
Right click it and click NEW
Put the name in and formula editor will open
Enter just as I have them written. Only change the Calculate one to use your actual field.
mlmcc
ASKER
Yep, didn't understand the formulas yet, but that did the trick.
Many thanks!!!
Many thanks!!!
ASKER
Hi, mlmcc!
Need some more help, if I may.
The formula worked, yet only for one field.
I have now 3 fields to do the same thing, but the codes only work for the first field I apply.
Need some more help, if I may.
The formula worked, yet only for one field.
I have now 3 fields to do the same thing, but the codes only work for the first field I apply.
The easy way to handle that is to replicate the formula for each field. You will have to change the variable names.
For instance the DeclareVariables formula could be
The others would be modified in the same way
mlmcc
For instance the DeclareVariables formula could be
WhilePrintingRecords;
Global NumberVar GroupTotal1 :=0;
Global BooleanVar IsFirstInGroup1 := True;
Global NumberVar GroupTotal2 :=0;
Global BooleanVar IsFirstInGroup2 := True;
Global NumberVar GroupTotal3 :=0;
Global BooleanVar IsFirstInGroup3 := True;
''
The others would be modified in the same way
mlmcc
Create a NEW Running Total
Select your field to summarize
Set the EVALUATE option
ON CHANGE OF FIELD
Set the RESET option
ON CHANGE OF GROUP
mlmcc