P
Pauline Huser
I was able to create a dynamic report and get a total at the bottom of the
report but need a grouping total, I pasted the Report Footer code to the
Group Footer but it's doing a running total, just need a little help to
change the code to only total up the Group
This is the code for the GroupFooter that is doing a running total
' Variables for number of columns and row and report totals.
Dim intColumnCount As Integer
Dim lngRgColumnTotal(1 To conTotalColumns) As Long
Dim lngReportTotal As Long
Private Sub GroupFooter1_Format(Cancel As Integer, FormatCount As Integer)
Dim intX As Integer
' Put column totals in text boxes in report footer.
' Start at column 2 (first text box with crosstab value).
For intX = 2 To intColumnCount
Me("GTot" + Format(intX)) = lngRgColumnTotal(intX)
Next intX
' Put grand total in text box in report footer.
Me("GTot" + Format(intColumnCount + 1)) = lngReportTotal
' Hide unused text boxes in report footer.
For intX = intColumnCount + 2 To conTotalColumns
Me("GTot" + Format(intX)).Visible = False
Next intX
End Sub
Thanks for all the help
report but need a grouping total, I pasted the Report Footer code to the
Group Footer but it's doing a running total, just need a little help to
change the code to only total up the Group
This is the code for the GroupFooter that is doing a running total
' Variables for number of columns and row and report totals.
Dim intColumnCount As Integer
Dim lngRgColumnTotal(1 To conTotalColumns) As Long
Dim lngReportTotal As Long
Private Sub GroupFooter1_Format(Cancel As Integer, FormatCount As Integer)
Dim intX As Integer
' Put column totals in text boxes in report footer.
' Start at column 2 (first text box with crosstab value).
For intX = 2 To intColumnCount
Me("GTot" + Format(intX)) = lngRgColumnTotal(intX)
Next intX
' Put grand total in text box in report footer.
Me("GTot" + Format(intColumnCount + 1)) = lngReportTotal
' Hide unused text boxes in report footer.
For intX = intColumnCount + 2 To conTotalColumns
Me("GTot" + Format(intX)).Visible = False
Next intX
End Sub
Thanks for all the help