Print Blank Lines

R

Rick Allison

Any ideas how to print blank lines, four or five, at each "break"?

Right now the report breaks as desired and starts printing on a new page. The user now wants to print the report in a continuous fashion but between each break wants four of five blank lines.

Has anyone ever been asked to do this and if yes, what did you do?
 
D

Duane Hookom

You can use code in the On Page event of a report to print any number of
lines on a report's page. Would this work for you? This code will print
about 20 lines with numbers and a red outline around the page. You might be
able to modify this to meet your needs.

Private Sub Report_Page()
Dim intRptHeadHeight As Integer
Dim intPageHeadHeight As Integer
Dim intTopMarg As Integer
Dim intDetailHeight As Integer
Dim intRecNum As Integer
intRptHeadHeight = Me.ReportHeader.Height
intPageHeadHeight = Me.Section(3).Height
intTopMarg = intRptHeadHeight + intPageHeadHeight
intDetailHeight = Me.Section(0).Height
For intRecNum = 1 To 20
Me.CurrentX = 200
Me.CurrentY = intTopMarg + _
((intRecNum - 1) * intDetailHeight)
Me.Print intRecNum
Me.Line (0, intTopMarg + _
(intRecNum * intDetailHeight)) _
-Step(Me.Width, 0)
Next
Me.ForeColor = vbRed
Me.DrawWidth = 20
Me.Line (0, 0)-(Me.ScaleWidth, Me.ScaleHeight), , B

End Sub


--
Duane Hookom
MS Access MVP
--

Any ideas how to print blank lines, four or five, at each "break"?

Right now the report breaks as desired and starts printing on a new page.
The user now wants to print the report in a continuous fashion but between
each break wants four of five blank lines.

Has anyone ever been asked to do this and if yes, what did you do?
 
R

Rick A

It might. Let me try.

I need to invoke the code on a break. How do I trap the break?
 
D

Duane Hookom

What's "the break"? Is this a section or page break control or what?

--
Duane Hookom
MS Access MVP
--

Rick A said:
It might. Let me try.

I need to invoke the code on a break. How do I trap the break?
 
R

Rick A

Duane,

A section break, I believe.

I've set up sorting and grouping - "EventDate" and set the values to: Group
Header = Yes, Group Footer = No, Group on = Each Value, Group Interval = 1,
and Keep Together = Whole group. For the EventDate section, Called
GroupHeader1 I've sent Force New Page to "Before Section. Everything else
is set to the defaults.

When I run the report, each time the EventDate changes the reports starts on
a new page. Instead of printing on a new page I want to print four blank
lines and continue on the same sheet of paper. How do I know that the
EventDate changed so I can invoke the code you provided and print blank
lines instead of forcing a new page?

I hope this helps because I need additional help.

--
Rick Allison
Duane Hookom said:
What's "the break"? Is this a section or page break control or what?
 
Top