Report with constant number of records

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a report that is supposed to substitude a standard form of the social
insurance department. This form has a predefined number of lines (say 20). If
the records that fill up that report are less than 20 then the records must
appear at the top of the report and have some empty records (lines) below so
that the total number of lines is 20. In this way the report should have the
same apearance as the social insurance standard form.
Does anyone have an idea on how to do this? The idea is to add some empty
records (lines) to a report so that it has a constant number of records.
Thanks in advance.
 
There have been many replies to questions like this in the Reports news
group. I would use the Line method in the On Page event of the report. You
would need to adjust the following code to match your line position and
size.

Private Sub Report_Page()
Dim intNumLines As Integer
Dim intLineNumber As Integer
Dim intTopMargin As Integer
Dim ctl As Control
Dim intLineHeight As Integer
Dim intLineLeft As Integer
Dim intLineWidth As Integer
intNumLines = 20
intLineLeft = 720 '1/2 inch from left margin
intLineWidth = 1440 * 5 '5 inches
intTopMargin = Me.Section(3).Height
intLineHeight = Me.Section(0).Height
For intLineNumber = 0 To intNumLines - 1
Me.Line (intLineLeft, intTopMargin + _
(intLineNumber * intLineHeight)) _
-Step(intLineWidth, 0)
Next
End Sub
 
Thanks a lot Duane I will try that

Duane Hookom said:
There have been many replies to questions like this in the Reports news
group. I would use the Line method in the On Page event of the report. You
would need to adjust the following code to match your line position and
size.

Private Sub Report_Page()
Dim intNumLines As Integer
Dim intLineNumber As Integer
Dim intTopMargin As Integer
Dim ctl As Control
Dim intLineHeight As Integer
Dim intLineLeft As Integer
Dim intLineWidth As Integer
intNumLines = 20
intLineLeft = 720 '1/2 inch from left margin
intLineWidth = 1440 * 5 '5 inches
intTopMargin = Me.Section(3).Height
intLineHeight = Me.Section(0).Height
For intLineNumber = 0 To intNumLines - 1
Me.Line (intLineLeft, intTopMargin + _
(intLineNumber * intLineHeight)) _
-Step(intLineWidth, 0)
Next
End Sub
 
Back
Top