I’ve tried to mimic this in our sample application, using a hierarchical data source Categories > Products and within the products a grouping by the “Discontinued” flag. The sample uses a group sum called
@ProductCounter. In the group footer, it does (excuse this, it’s really verbose):
"Total Products (running): "+ToString$(Cond(Products.Discontinued,
/* if product is discontinued, increment the corresponding counter */
/* if product is still available, increment the corresponding counter */
In other words - depending on the discontinuation flag, increment either the one or the other counter by the amount of products in the current group.
In the footer of the outer table I can then output
"Overall "+ToString$(GetVar("Continued")) +" Products continued, "+ToString$(GetVar("Discontinued"))+ " Products discontinued"
for my data.
I’m attaching the sample, you can open it with the demo application that comes with the product (Design > Reports).
Sample With Group Sums.srt (65.5 KB)