I have set up a report with group totals accumulating for a Yes/No field = "True(-1)" in the Group Header using code. I works perfectly as long as I have the Group Header visible. All of the group and grand totals are correct. The Yes/No field is actually on the Group header and the accumulating field is also to verify that it is accumulating correctly. I only want the Group Footer records displayed. When I make the Group Header Visible=NO (no other changes), all of the Group Totals for the field become Zero. Does the Group have to be Visible to make the report behave correctly? Here is the code.
Option Compare Database
Option Explicit
Public CountUndelivered As Integer
Public GroupCountUndelivered As Integer
Public TotalCountUndelivered As Integer
Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer)
GroupCountUndelivered = 0
CountUndelivered = 0
End Sub
Public Sub GroupHeader1_Print(Cancel As Integer, PrintCount As Integer)
If Me![Undeliverable] = -1 Then CountUndelivered = CountUndelivered + 1
If Me![Undeliverable] = -1 Then GroupCountUndelivered = GroupCountUndelivered + 1
If Me![Undeliverable] = -1 Then TotalCountUndelivered = TotalCountUndelivered + 1
End Sub
Thanks for helping!
Option Compare Database
Option Explicit
Public CountUndelivered As Integer
Public GroupCountUndelivered As Integer
Public TotalCountUndelivered As Integer
Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer)
GroupCountUndelivered = 0
CountUndelivered = 0
End Sub
Public Sub GroupHeader1_Print(Cancel As Integer, PrintCount As Integer)
If Me![Undeliverable] = -1 Then CountUndelivered = CountUndelivered + 1
If Me![Undeliverable] = -1 Then GroupCountUndelivered = GroupCountUndelivered + 1
If Me![Undeliverable] = -1 Then TotalCountUndelivered = TotalCountUndelivered + 1
End Sub
Thanks for helping!