antonyx
Arsenal Supporter
- Local time
- Today, 02:14
- Joined
- Jan 7, 2005
- Messages
- 556
i have a problem with positioning the totals on my report.. im using a template that automatically draws lines across the page..
at the moment im putting the totals in the report footer section..
here are the problems..
this is what my report looks like in design view
http://www.londonheathrowcars.com/Rpt.jpg
here is the report code..
i have limited the number of records per page to 11.
when there are 9 records being printed.. the report looks fine.. it looks like this..
http://www.londonheathrowcars.com/RptGood.jpg
However.. when for example 13 records are displayed.. the total gets moved down the page like this (this is page 2 screenshot)..
http://www.londonheathrowcars.com/RptBad.jpg
this makes me think that i need to specify using the x and y axis where the totals should be but i dont know how to do this..
i have attached a simple database.. if anyone can have a look at it i would be most grateful.. thank you.
at the moment im putting the totals in the report footer section..
here are the problems..
this is what my report looks like in design view
http://www.londonheathrowcars.com/Rpt.jpg
here is the report code..
Code:
Option Compare Database
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If [textboxcounter] Mod 11 = 0 Then
Me.Detail.ForceNewPage = 2
Else
Me.Detail.ForceNewPage = 0
End If
End Sub
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
If InStr(txttdfare, ".") = 0 Then
txttdfare.DecimalPlaces = "0"
Else
txttdfare.DecimalPlaces = "2"
End If
If InStr(txttdcp, ".") = 0 Then
txttdcp.DecimalPlaces = "0"
Else
txttdcp.DecimalPlaces = "2"
End If
If InStr(txttdextra, ".") = 0 Then
txttdextra.DecimalPlaces = "0"
Else
txttdextra.DecimalPlaces = "2"
End If
If InStr(txttdtotal, ".") = 0 Then
txttdtotal.DecimalPlaces = "0"
Else
txttdtotal.DecimalPlaces = "2"
End If
If InStr(txtfaretotal, ".") = 0 Then
txtfaretotal.DecimalPlaces = "0"
Else
txtfaretotal.DecimalPlaces = "2"
End If
If InStr(txtmaintotal, ".") = 0 Then
txtmaintotal.DecimalPlaces = "0"
Else
txtmaintotal.DecimalPlaces = "2"
End If
End Sub
Private Sub Report_Page()
On Error Resume Next
Me.DrawWidth = 5
Me.Line (300, 1600)-(16550, 1600)
Me.Line (300, 2000)-(16550, 2000)
Me.Line (300, 2700)-(16550, 2700)
Me.Line (300, 3400)-(16550, 3400)
Me.Line (300, 4100)-(16550, 4100)
Me.Line (300, 4800)-(16550, 4800)
Me.Line (300, 5500)-(16550, 5500)
Me.Line (300, 6200)-(16550, 6200)
Me.Line (300, 6900)-(16550, 6900)
Me.Line (300, 7600)-(16550, 7600)
Me.Line (300, 8300)-(16550, 8300)
Me.Line (300, 9000)-(16550, 9000)
Me.Line (300, 9700)-(16550, 9700)
Me.Line (300, 1600)-(300, 9700)
Me.Line (1300, 1600)-(1300, 9700)
Me.Line (2300, 1600)-(2300, 9700)
Me.Line (3350, 1600)-(3350, 9700)
Me.Line (5850, 1600)-(5850, 9700)
Me.Line (8350, 1600)-(8350, 9700)
Me.Line (10850, 1300)-(10850, 10000)
Me.Line (11650, 1600)-(11650, 9700)
Me.Line (12550, 1600)-(12550, 9700)
Me.Line (13150, 1600)-(13150, 9700)
Me.Line (14050, 1600)-(14050, 9700)
Me.Line (14850, 1600)-(14850, 9700)
Me.Line (15650, 1600)-(15650, 9700)
Me.Line (16550, 1600)-(16550, 9700)
End Sub
i have limited the number of records per page to 11.
when there are 9 records being printed.. the report looks fine.. it looks like this..
http://www.londonheathrowcars.com/RptGood.jpg
However.. when for example 13 records are displayed.. the total gets moved down the page like this (this is page 2 screenshot)..
http://www.londonheathrowcars.com/RptBad.jpg
this makes me think that i need to specify using the x and y axis where the totals should be but i dont know how to do this..
i have attached a simple database.. if anyone can have a look at it i would be most grateful.. thank you.