M
M100C
All,
I have a report bound to a dataset that returns records like so:
ID, Value
1, 10
1, 7
1, 6
2, 12
2, 9
2, 2
I have a grouping footer (based on ID) with a textbox, which has a
controlsource of '=Max(Value)'. Because there are two unique ID's, there
are two footers, and the textbox in each footer has values of 10 and 12,
respectively.
I would like to have a textbox in the report footer with provides me an
average of these maximum values ... in the example above, the average would
be (10 + 12) / 2, or 11. Here is what I have done so far:
1) I am using the grouping footer OnPrint event to count and sum the values
in the textbox control, as the report runs. This event fires twice, and
results in setting public variables with the correct average.
2) Unfortunately, the controlsource property of the textbox in the report
footer is not exposed ... it appears that I cannot set it. I would have
assumed that I would be able to set this property from the report footer's
OnFormat event, but not so.
Any suggestions (w/o having to requery or step through the recordset ... I
know how to do this)?
M100C
I have a report bound to a dataset that returns records like so:
ID, Value
1, 10
1, 7
1, 6
2, 12
2, 9
2, 2
I have a grouping footer (based on ID) with a textbox, which has a
controlsource of '=Max(Value)'. Because there are two unique ID's, there
are two footers, and the textbox in each footer has values of 10 and 12,
respectively.
I would like to have a textbox in the report footer with provides me an
average of these maximum values ... in the example above, the average would
be (10 + 12) / 2, or 11. Here is what I have done so far:
1) I am using the grouping footer OnPrint event to count and sum the values
in the textbox control, as the report runs. This event fires twice, and
results in setting public variables with the correct average.
2) Unfortunately, the controlsource property of the textbox in the report
footer is not exposed ... it appears that I cannot set it. I would have
assumed that I would be able to set this property from the report footer's
OnFormat event, but not so.
Any suggestions (w/o having to requery or step through the recordset ... I
know how to do this)?
M100C