report template.. fill the page

antonyx

Arsenal Supporter
Local time
Today, 19:50
Joined
Jan 7, 2005
Messages
556
i made a report here..

http://www.londonheathrowcars.com/rep1.jpg

you cant see in the above image but ive put lines and made a table so several records print like so..

http://www.londonheathrowcars.com/rep2.jpg

at the moment as you would expect, a row in the table only appears per record.

BUT.. i want the actual grid lines i have created to continue printing till the bottom of the page, even if only one record is added.. this way.. when it prints. my user can still write details into the boxes on the rest of the page

can this be done?
 
lines in report

Place the following code in the On Page property of your report. It will print 25 lines down the report no matter how many records you have. You will have to make a few adjustments. Let me know if this gets you in the right direction.

If you play with the x,y coordinates and add a couple more me.line commands you should be able to get what you want


Dim intRows As Integer
Dim intLoop As Integer
Dim intTopMargin As Integer
Dim intDetailHeight As Integer
intRows = 24
intDetailHeight = Me.Section(0).Height
intTopMargin = 360
Me.FontSize = 16
For intLoop = 0 To intRows
Me.CurrentX = 20
Me.CurrentY = intLoop * intDetailHeight + intTopMargin
Me.Print intLoop + 1
Me.Line (0, intLoop * intDetailHeight + intTopMargin)- _
Step(Me.Width, intDetailHeight), , B
Next
 
you legend rick thank you.. ill give it a try tomorrow and report back..


get it..

report back..

hahah
 
trying to make something of the code you gave me..

Code:
Option Compare Database

Private Sub Report_Page()
Dim intRows As Integer
Dim intLoop As Integer
Dim intTopMargin As Integer
Dim intDetailHeight As Integer
intRows = 24
intDetailHeight = Me.Section(0).Height
intTopMargin = 360
Me.FontSize = 16
For intLoop = 0 To intRows
Me.CurrentX = 20
Me.CurrentY = intLoop * intDetailHeight + intTopMargin
Me.Print intLoop + 1
Me.Line (0, intLoop * intDetailHeight + intTopMargin)- _
Step(Me.Width, intDetailHeight), , B
Next
End Sub

its looking like this at the moment..

in design mode http://www.londonheathrowcars.com/des.jpg

in preview mode http://www.londonheathrowcars.com/des2.jpg

what i need to do is first remove the numbers.. and secondly if someone could explain to me how i can create a vertical line.. then i will create the lines going down the page to separate the sections..

thanks
 
lines

rem out the me.print statement

If you don't want to use a loop for the vertical lines do the following:

To create some vertical lines just put a few lines of code after the Next statement like

me.line (0,whateveryvalueyouwanttostartat)-(0,whateveryvalueyouwanttoendat),,B

me.line (1000,whateveryvalueyouwanttostartat)-(1000,whateveryvalueyouwanttoendat),,B


me.line (2000,whateveryvalueyouwanttostartat)-(2000,whateveryvalueyouwanttoendat),,B
 
Code:
Option Compare Database

Private Sub Report_Page()
Dim intRows As Integer
Dim intLoop As Integer
Dim intTopMargin As Integer
Dim intDetailHeight As Integer
intRows = 24
intDetailHeight = Me.Section(0).Height
intTopMargin = 360
Me.FontSize = 16
For intLoop = 0 To intRows
Me.CurrentX = 20
Me.CurrentY = intLoop * intDetailHeight + intTopMargin
Me.Line (0, intLoop * intDetailHeight + intTopMargin)- _
Step(Me.Width, intDetailHeight), , B
Next
[b]Me.Line (0, 1)-(0, 100), , B[/b]
End Sub

i tried adding a line.. without success.. nothing appears..

what is wrong
 
lines

Put this in instead and you should see it.


Me.Line (1000, 1)-(1000, 4000), , B
 
still cant see nothin with this my friend..

Code:
Option Compare Database

Private Sub Report_Page()
Dim intRows As Integer
Dim intLoop As Integer
Dim intTopMargin As Integer
Dim intDetailHeight As Integer
intRows = 24
intDetailHeight = Me.Section(0).Height
intTopMargin = 360
Me.FontSize = 16
For intLoop = 0 To intRows
Me.CurrentX = 20
Me.CurrentY = intLoop * intDetailHeight + intTopMargin
Me.Line (0, intLoop * intDetailHeight + intTopMargin)- _
Step(Me.Width, intDetailHeight), , B
Next
Me.Line (1000, 1)-(1000, 4000), , B
End Sub

it looks like this..

http://www.londonheathrowcars.com/it.jpg
 
ok here in 2k format hope thats cool..

its called report 1
 

Attachments

lines

Place the following code after the Next statement


Me.Line (900, 400)-(900, 16000)
Me.Line (3500, 400)-(3500, 16000)

You should see this now.
 
i seeeee it..

woohoo..

ill mess about with it now and give you a shout if.. i mean when i get stuck..

thank you
 
lines

Don't see the new report.
No vertical lines in the db you zipped.

By the way, you have a line in the page footer. Delete that, and then on the right side of your report in design view adjust the width so that it is snug to the right side of your right most tex box. That's why you are getting 2 pages.
 
hmmmmmm.. give me 2 minutes...

and probably the few second delay we all face when usin the net..
 

Users who are viewing this thread

Back
Top Bottom