trouble positioning report totals

antonyx

Arsenal Supporter
Local time
Today, 14:52
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..
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.
 

Attachments

Your grid looks like its drawn on the report first, and not very well at that. The grid should be the report control borders, not an aritficial grid.
 
Your grid looks like its drawn on the report first, and not very well at that. The grid should be the report control borders, not an aritficial grid.

you are probably right.. but this is the level i have reached at the moment.. i dont know any other way to do it.
 
Set the "Border Style" property for each textbox to Solid. The weight, size of the border can be adjusted with each textbox's "Border Width" property.

Select all the textboxes at once and set their subject properties all at once. Of course, if you have infinite time, select and change them one at a time.

All report textboxes should be abuted and aligned vertifally and horiziontally. A nice grid will result, but only for the exact number of rows you have.

To abutt each textbox, select and drag until the edges align "perfectly;" otherwise, select two and select in the menu Format > Align > (Left, Right, Top, or Bottom) as appropriate. Of course there are icons to do all this.
 
the reason i have built the grid in the first place is because i need the whole page to have a grid..

even if one record prints.. the rest of the page has to have a grid because my user will be writing details on the page..

wouldnt it be easier to keep the grid i have (even though it is lame)..

and just help me position the 'total' so it displays nicely at the bottom of the page..
 
Guess you need to take drawing lessons.

You just have to draw like Access does, use a series of abbutted boxes. Then copy them for each line you need.

Otherwise, use paper with the boxes (forms) drawn perfectly only them.

Your client is asking for something which has an extraordinaryly high cost benefit ratio.

One has to do what one has to do, even if it ain't easy and costs a lot of time and money.

Access is excellant for reporting data, it not a form drawing program.

If you're getting pushed, push back.
 
you know what.. i have just realised i dont need the grid on these reports..

lol.. what a waste of time.. i see what your saying though..

its not really the traditional client-designer relationship.. its pretty much my business aswell and the only reason we are not completely abolishing 'pen and paper' is because my users father needs to record some information on paper as he will not even look at a pc..

thanks for your thoughts anyway.
 

Users who are viewing this thread

Back
Top Bottom