Adding Maximum values

G

Guest

I'm sure this has an easy answer, but I have not been able to figure it out.

I've create a report that calculates the maximum enrollment for each
preschool. I did it using the following fields in the given sections:

Detail section: [Enrollment]
Provider Footer: =Max([Enrollment]

I need a sum of all the Max([Enrollment]) for a grand total at the bottom,
but I can't figure out the proper expression. Everything I try yields an
error message. Thank you for your help!
 
A

Allen Browne

In the Provider footer section, place another text box, and set these
properties:
Control Source =[Text1]
Running Sum Over All
Visible No
Format General Number
Name txtMaxOfEnrollmentRS
replacing Text1 with name of the text box you already have.

In the Report Footer section, place a text box with Control Source of:
=[txtMaxOfEnrollmentRS]

The invisible text box collects the running sum across the whole report, and
the final text box in the report footer displays it.
 
G

Guest

Allen,
Sorry it took me a while to get back to you. In the meantime, I had to add
another group (region) to the report.

I was able to get the running sum going, and get a subtotal in the Provider
footer, and region footer, but the grand total still wasn't adding up.

But because your instructions were so clear and easy to follow, I took your
concept and duplicated your advice by adding an additional invisible field in
the Region footer, naming it, and having the grand total call on that name.
Now it works like a charm.

Thank you so much for your help. You are the best!


Allen Browne said:
In the Provider footer section, place another text box, and set these
properties:
Control Source =[Text1]
Running Sum Over All
Visible No
Format General Number
Name txtMaxOfEnrollmentRS
replacing Text1 with name of the text box you already have.

In the Report Footer section, place a text box with Control Source of:
=[txtMaxOfEnrollmentRS]

The invisible text box collects the running sum across the whole report, and
the final text box in the report footer displays it.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

NB said:
I'm sure this has an easy answer, but I have not been able to figure it
out.

I've create a report that calculates the maximum enrollment for each
preschool. I did it using the following fields in the given sections:

Detail section: [Enrollment]
Provider Footer: =Max([Enrollment]

I need a sum of all the Max([Enrollment]) for a grand total at the bottom,
but I can't figure out the proper expression. Everything I try yields an
error message. Thank you for your help!
 
A

Allen Browne

Well done!

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

NB said:
Allen,
Sorry it took me a while to get back to you. In the meantime, I had to
add
another group (region) to the report.

I was able to get the running sum going, and get a subtotal in the
Provider
footer, and region footer, but the grand total still wasn't adding up.

But because your instructions were so clear and easy to follow, I took
your
concept and duplicated your advice by adding an additional invisible field
in
the Region footer, naming it, and having the grand total call on that
name.
Now it works like a charm.

Thank you so much for your help. You are the best!


Allen Browne said:
In the Provider footer section, place another text box, and set these
properties:
Control Source =[Text1]
Running Sum Over All
Visible No
Format General Number
Name txtMaxOfEnrollmentRS
replacing Text1 with name of the text box you already have.

In the Report Footer section, place a text box with Control Source of:
=[txtMaxOfEnrollmentRS]

The invisible text box collects the running sum across the whole report,
and
the final text box in the report footer displays it.

NB said:
I'm sure this has an easy answer, but I have not been able to figure it
out.

I've create a report that calculates the maximum enrollment for each
preschool. I did it using the following fields in the given sections:

Detail section: [Enrollment]
Provider Footer: =Max([Enrollment]

I need a sum of all the Max([Enrollment]) for a grand total at the
bottom,
but I can't figure out the proper expression. Everything I try yields
an
error message. Thank you for your help!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top