Suppressing just hides things (except for subreports). The calculations keep going. To keep from calculating, you need to put in the same condition as for the suppression into the formula so it does not calculate.
IF {@VII. ProjectComplete%} > .89 then
RRGM2 := RRGM2+{@VIII. RTD GmRow$ };
RRGM2
I’ve seen issues in the past with this type of formula where nothing is displayed if the most recent record does not meet the condition for the equation. Making the change to add the variable at the end will ensure that it will always show.
There is another option as well - use a Running Total instead of calculating this yourself. You would set the following in the Running Total Expert:
Field to Summarize: +{@VIII. RTD GmRow$ }
Type of Summary: Sum
Evaluate: On formula. The formula would be: {@VII. ProjectComplete%} > .89 and not (your suppression formula)
Reset: On change of group: your Group 1
100/10 = 10. So, you’ve either posted an invalid example or you’ve switched the values in your formula in the report. From what you’ve shown, the logic should be (value from subreport)/(sum from group 2) if you’re looking for a number between 0 and 1.
D Cost
G2 A Sub-report retrieving value for project
G2 B project 1 sum of cost is 100 p is .80 = calculation cost 100/value
G2 B project 2 sum of cost is 80 p is .75 = calculation cost 80/value
G2 B project 3 sum of cost is 20 p is .95 = calculation cost 20/value
my rte
whileprintingrecords;
numbervar RRGM;
if pt < .90 then RRGM:= RRGM+Cost
RRGM
Ok, so what I see you saying is that the numbers are correct when you drill down into Group 2 but not when you sum them at the Group 1 level. Is that correct?
Not sure why while drilling on G2 the G1 sum is 180 (correct) however on main (no drill) G1 is 200. Any explanation would be greatly appreciated. Even if its not possible.
The subreports don’t run until you open the drill-down. So, your percentage is 0. Since 0 < .89, all of the values are summed. So, you’re not getting the correct info because some of it is based on the subreport. Because of this, you probably won’t be able to do what you’re trying to do.
I modified the underlining view. A union all to retrieve my amounts to determine %. Then modified report selection criteria as well as column conditions.
I used running total on subtotals and grand totals.
Woks perfect. Finally had sometime to think about it.