OkieGlocker
Programmer
Hello to all - new to this board and need some advanced help.
I have a report that was inherited from a previous developer that used 30 unbound Text Boxes and IIF statements to count students who graduated in a certain year and met 2 other criteria. This report has the output grouped by County and, within County, by School. It works well, even if it is a little slow but it is high maintenance. I have been given the task of making the report low-to-no maintenance and speeding it up.
I have created a QueryDef to create a RecordSet that uses a GradYr field as a parameter. This report covers a span of 15 years, but the report doesn't know which years until runtime when it grabs the highest year from GradYr, then counts backwards 14 years to get the range for the report. That part works fine and looping through the years is no problem. For each iteration of the loop I requery with a different GradYr from the parameter and stick the count in an array. After the loop is completed, I pull my results out of the array to populate the report fields.
Here's my problem: How do I get a coded solution to recognize the groupings of the report page and give me totals for each group? When I run the report it is much quicker, but it only displays totals in every field.
I've tried this code in the OnOpen and OnActivate events of the report and the OnFormat and OnPrint events of the group footers and nothing has given me what I need. I either get all totals printing or a blank report, so this may or may not be an event issue.
How can I get my code to run within the report groups and give me totals in the footers for school (inner group) and County (outer group)? I'm stumped on it.
Thanks in advance for any help any of you can give me.
David
I have a report that was inherited from a previous developer that used 30 unbound Text Boxes and IIF statements to count students who graduated in a certain year and met 2 other criteria. This report has the output grouped by County and, within County, by School. It works well, even if it is a little slow but it is high maintenance. I have been given the task of making the report low-to-no maintenance and speeding it up.
I have created a QueryDef to create a RecordSet that uses a GradYr field as a parameter. This report covers a span of 15 years, but the report doesn't know which years until runtime when it grabs the highest year from GradYr, then counts backwards 14 years to get the range for the report. That part works fine and looping through the years is no problem. For each iteration of the loop I requery with a different GradYr from the parameter and stick the count in an array. After the loop is completed, I pull my results out of the array to populate the report fields.
Here's my problem: How do I get a coded solution to recognize the groupings of the report page and give me totals for each group? When I run the report it is much quicker, but it only displays totals in every field.
I've tried this code in the OnOpen and OnActivate events of the report and the OnFormat and OnPrint events of the group footers and nothing has given me what I need. I either get all totals printing or a blank report, so this may or may not be an event issue.
How can I get my code to run within the report groups and give me totals in the footers for school (inner group) and County (outer group)? I'm stumped on it.
Thanks in advance for any help any of you can give me.
David