Vertical Lines On a report

iandanescourt

New member
Local time
Today, 05:51
Joined
Apr 29, 2004
Messages
8
I am using a report to represent a replica of a form that I require for my workplace.
The report is separated into columns in which data is entered and segregated by vertical lines and each report is separated by a group header.

I have been able to follow the advice given in knowledge base article 210350 to achieve a constant number of lines per group.
My problem is this that I have a maximum number of entries per page set to 9, if the number of items is below 9 no problem the module does the works and prints extra lines to finish off the report. Problems are apparent when I have more entries in the group that 9.
I realise that this is stated in the knowledge base but is there a way in which I can code the module to adjust itself dependent upon the number of entries in the group.

Here is the code that I have used
Option Compare Database
Option Explicit
Global TotCount As Integer

' Call the SetCount() function from the group header section's
' OnPrint property using the syntax: =SetCount(Report)

Function SetCount(R As Report)
TotCount = 0
R![ATAChapterNumber].Visible = True
End Function

' Call the PrintLines() function from the detail section's OnPrint
' property using the syntax: =PrintLines(Report,[TotGrp]).

Function PrintLines(R As Report, TotGrp)
TotCount = TotCount + 1
If TotCount = TotGrp Then
R.NextRecord = False
ElseIf TotCount > TotGrp And TotCount < 9 Then
R.NextRecord = False
R![WorkPerformed].Visible = False
R![AircraftRegistration].Visible = False
R![ModelNumber].Visible = False
R![ManufactureresSerialNumber].Visible = False
R![DatePerformed].Visible = False
End If
End Function

Many thanks in advance

Ian
 

Users who are viewing this thread

Back
Top Bottom