Group formula results keep tallying together as groups go by in re

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I am writing a report where it is running a count and sum of two values in a
group, for multiple groups.

It works fine for the first one, but it takes the results from the first one
and tallys (adds)it onto the second group and so on.

Here is the report so far.

loadDate (Group header)

(details) loadSQRFoot ordShipped ordLate sqrtypeName

(Group Footer)
Count of sqrtypeName and Sum of that count


Here is the formulas that I use:

=Abs(Sum([sqrtypeName]="Pick-Up")) - There is three values for sqrtypeName.
Pick-Up, Local, Long. This gives me the count.

=Sum(Abs([sqrtypeName]="Pick-Up")*[loadSQRFoot]) - This just sums up the
data for the group of that type.

Is there a reason why it is tallying this data on for each group as it goes?
 
Hi, Keldair,

In Grouping and Sorting, give the field sqrtypeName its own footer, which
should appear immediately below the detail section. In this new footer, you
need two mathematical textboxes, one for loadSQRFoot and one for sqrtypeName.
The textbox for loadSQRFoot should have simply "=Sum(loadSQRFoot)" (minus the
quotes) in the Control Source property, and give it a name. The textbox for
sqrtypeName should have "=Count(sqrtypeName)", and give that a name. Make the
Visible property for both of these controls equal to False. Now make a new
textbox - in the same footer - wide enough to have a large text, like "There
were " & name of the sqrtypeName textbox & " " & sqrtypeName & " shipments
for a Total " & name of the loadSQRFoottextbox & " square feet." Of course,
you can play with the text, but I gave you the basic idea.

Hope this helps,

Sam
Hello,

I am writing a report where it is running a count and sum of two values in a
group, for multiple groups.

It works fine for the first one, but it takes the results from the first one
and tallys (adds)it onto the second group and so on.

Here is the report so far.

loadDate (Group header)

(details) loadSQRFoot ordShipped ordLate sqrtypeName

(Group Footer)
Count of sqrtypeName and Sum of that count


Here is the formulas that I use:

=Abs(Sum([sqrtypeName]="Pick-Up")) - There is three values for sqrtypeName.
Pick-Up, Local, Long. This gives me the count.

=Sum(Abs([sqrtypeName]="Pick-Up")*[loadSQRFoot]) - This just sums up the
data for the group of that type.

Is there a reason why it is tallying this data on for each group as it goes?
 
Back
Top