I have a report that has a "status" footer - In the status footer I have code that sums only if the status = "rel to mkt" -
The report is fine, however, when I save it to snapshot viewer, it doubles all of the totals in the status footer - when I print it again, it doubles again. I am pretty sure it has to do with my code in the detail print event which is as follows:
Dim IntX As Integer
Dim lngRowTotal As Long
' If PrintCount is 1, initialize rowTotal variable.
' Add to column totals.
If Me.PrintCount = 1 Then
lngRowTotal = 0
For IntX = 3 To intColumnCount
' Starting at column 3 (first text box with crosstab value),
' compute total for current row in detail section.
lngRowTotal = lngRowTotal + Me("Col" + Format(IntX))
' Add crosstab value to total for current column.
lngRgColumnTotal(IntX) = lngRgColumnTotal(IntX) + Me("Col" + Format(IntX))
If Col1 = "rel to mkt" Then
lngRgColumnTotalRelToMkt(IntX) = lngRgColumnTotalRelToMkt(IntX) + Me("Col" + Format(IntX))
End If
Next IntX
Any help would be greatly appreciated!!!!!
Fred
The report is fine, however, when I save it to snapshot viewer, it doubles all of the totals in the status footer - when I print it again, it doubles again. I am pretty sure it has to do with my code in the detail print event which is as follows:
Dim IntX As Integer
Dim lngRowTotal As Long
' If PrintCount is 1, initialize rowTotal variable.
' Add to column totals.
If Me.PrintCount = 1 Then
lngRowTotal = 0
For IntX = 3 To intColumnCount
' Starting at column 3 (first text box with crosstab value),
' compute total for current row in detail section.
lngRowTotal = lngRowTotal + Me("Col" + Format(IntX))
' Add crosstab value to total for current column.
lngRgColumnTotal(IntX) = lngRgColumnTotal(IntX) + Me("Col" + Format(IntX))
If Col1 = "rel to mkt" Then
lngRgColumnTotalRelToMkt(IntX) = lngRgColumnTotalRelToMkt(IntX) + Me("Col" + Format(IntX))
End If
Next IntX
Any help would be greatly appreciated!!!!!
Fred