Hello all. I have a report that I am developing which gives a tabulation of the time and money an attorney has billed out over a period of time. It also shows time held, time that has been billed, but is still on hold, and time that has neither been billed or held. The problem I am having is this: When my report is print previewed, the numbers are correct. However, when I go to print the report, all the values on the hard copy have been doubled. Does anyone have a solution to this problem?
Here is the code for my Detail Format Event which calculates the totals:
Public HeldCharge As Double
Public BilledCharge As Double
Public HeldBilled As Double
Public Neither As Double
Public chg As Double
Public un As Double
Public HeldUnits As Double
Public BilledUnits As Double
Public HeldBilledUnits As Double
Public NeitherUnits As Double
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
chg = Nz(Me![CHARGE], 0)
un = Nz(Me![UNITS], 0)
If (Me![BILLFLAG] = "B" And IsNull(Me![HOLDFLAG])) Then
BilledCharge = BilledCharge + chg
BilledUnits = BilledUnits + un
ElseIf (Me![HOLDFLAG] = "H" And IsNull(Me![BILLFLAG])) Then
HeldCharge = HeldCharge + chg
HeldUnits = HeldUnits + un
ElseIf (Me![HOLDFLAG] = "H" And Me![BILLFLAG] = "B") Then
HeldBilled = HeldBilled + chg
HeldBilledUnits = HeldBilledUnits + un
ElseIf (IsNull(Me![BILLFLAG]) And IsNull(Me![BILLFLAG])) Then
Neither = Neither + chg
NeitherUnits = NeitherUnits + un
End If
Me!Text2 = BilledCharge
Me!Text4 = HeldCharge
Me!Text6 = HeldBilled
Me!Text8 = Neither
Me!Text14 = BilledUnits
Me!Text16 = HeldUnits
Me!Text18 = HeldBilledUnits
Me!Text20 = NeitherUnits
Also, on the Report Format event, all of the public values are initialized to 0. Any suggestions would be most appreciated.
Thanks,
Ed
Here is the code for my Detail Format Event which calculates the totals:
Public HeldCharge As Double
Public BilledCharge As Double
Public HeldBilled As Double
Public Neither As Double
Public chg As Double
Public un As Double
Public HeldUnits As Double
Public BilledUnits As Double
Public HeldBilledUnits As Double
Public NeitherUnits As Double
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
chg = Nz(Me![CHARGE], 0)
un = Nz(Me![UNITS], 0)
If (Me![BILLFLAG] = "B" And IsNull(Me![HOLDFLAG])) Then
BilledCharge = BilledCharge + chg
BilledUnits = BilledUnits + un
ElseIf (Me![HOLDFLAG] = "H" And IsNull(Me![BILLFLAG])) Then
HeldCharge = HeldCharge + chg
HeldUnits = HeldUnits + un
ElseIf (Me![HOLDFLAG] = "H" And Me![BILLFLAG] = "B") Then
HeldBilled = HeldBilled + chg
HeldBilledUnits = HeldBilledUnits + un
ElseIf (IsNull(Me![BILLFLAG]) And IsNull(Me![BILLFLAG])) Then
Neither = Neither + chg
NeitherUnits = NeitherUnits + un
End If
Me!Text2 = BilledCharge
Me!Text4 = HeldCharge
Me!Text6 = HeldBilled
Me!Text8 = Neither
Me!Text14 = BilledUnits
Me!Text16 = HeldUnits
Me!Text18 = HeldBilledUnits
Me!Text20 = NeitherUnits
Also, on the Report Format event, all of the public values are initialized to 0. Any suggestions would be most appreciated.
Thanks,
Ed