Hello,
I create report with textboxes with property 'cangrow' set to 'true'. Also I
have vertical lines on the report's detail section to seperate data fields
(textboxes).
When textboxes grows vertical lines remain with its oryginal height and they
don't make continuous lines throu all the detail section while report is
printed.
How and when to change size of the lines to have it throu all heigh of
detail section?
thanks in advance
k.halski
Use the Line method in the Report's Page event.
Place this code in the Report's Page event to draw a line down the
center of the page, from the bottom of the Page Header to the top of
the Page Footer.
You'll need to change X1 if you want the line drawn elsewhere on the
page.
' *** ALL NUMBERS ARE IN PIXELS... ***
Private Sub Report_Page()
Dim X1, Y1, X2, Y2 As Single
Me.DrawStyle = 0 ' a solid line
Me.DrawWidth = 1 ' set the thickness of the line
' Set the coordinates and draw a line down the middle of the page.
X1 = Int(Me.ScaleWidth / 2) ' find the middle of the page
Y1 = Me.Section(3).Height ' start just below the page header
X2 = X1 ' the line is vertical
' length of line is the length of the Page - (Height of the Page
' Header + Height of the Page Footer).
Y2 = Me.ScaleHeight - (Me.Section(1).Height + Me.Section(4).Height)
Me.Line (X1, Y1)-(X2, Y2) ' This draws the line
End Sub
=======
This line
Y1 = Me.Section(3).Height ' start just below the page header
has to be adjusted if you wish it to start elsewhere.
If you also have a group header, simply add it's height to the Page
Header height.
Y1 = Me.(Section(3).Height + Me.Section(X).Height
Change the (X) above to whatever the number value of the Group Section
is.
The Report Header section is (1), the Page Header section is (3).
The Group Header section number will vary, according to the layout of
your report. You may have to include any other section's height as
well.