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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
"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 | |
|
|