A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Group Calculations and "repeat Section"



 
 
Thread Tools Display Modes
  #1  
Old May 10th, 2005, 05:48 AM
Gordzilla
external usenet poster
 
Posts: n/a
Default Group Calculations and "repeat Section"

I have a bunch of simple calculations, based on the grouping of items in a
report.
There is a grup header and footer. The foot contains a total count of
detail records and subsets of various criteria and calculated percentages.
My problem is that some of the groups span multiple pages and I have the
"repeat section" set to yes in the Group header. My calculations only seem
to work when the group is on one page anything over a page only calculates on
the details contained on the last page with a group header. The group header
has code behind which resets all the variables back to zero.

Ideas? Suggestions?
  #2  
Old May 10th, 2005, 06:12 AM
Larry Linson
external usenet poster
 
Posts: n/a
Default

"Gordzilla" wrote

I have a bunch of simple calculations,
based on the grouping of items in a
report. There is a grup header and
footer. The foot contains a total count
of detail records and subsets of various
criteria and calculated percentages.
My problem is that some of the groups
span multiple pages and I have the
"repeat section" set to yes in the Group
header. My calculations only seem
to work when the group is on one page
anything over a page only calculates on
the details contained on the last page with
a group header. The group header has
code behind which resets all the variables
back to zero.


It seems to me that you are going to have to redesign your calculations so
that the header does not reset the values to zero when it prints on each
page because of the repeat factor, or you are going to have to eliminate the
repeat factor, or you are going to have to obtain the results in another
way.

Perhaps you could reset the values in the Footer, or only when the value on
which you are grouping changes, if your calculations must be done in code as
you have them now, but...

Because the firing of events is difficult to predict, I try to avoid doing
calculations in event code. When possible I use calculated Fields in the
Query that is RecordSource for the Report, or calculated Controls within the
Report itself.

Larry Linson
Microsoft Access MVP




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:08 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.