Try to use subreport.
Main report fields : Name, Birth, Sex
Subreport fields : Address, Phone
Subreport placed in Page footer. Both report linked and grouped by Class_code.
Then add some codes in main report property :
Code:
Dim RecPerPage As Integer
Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer)
'Reset record per page for each group
RecPerPage = 1
End Sub
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
'Set max record per page = 5
If RecPerPage = 5 Then
Reports![Main_Report].Section(acDetail).ForceNewPage = 1
RecPerPage = 0
Else
Reports![Main_Report].Section(acDetail).ForceNewPage = 0
End If
RecPerPage = RecPerPage + 1
End Sub
The field arrangement works perfectly with limited record per page in main report, but I can't limit the record in each subreport page.
For example, if a Class_Code has 12 records, the first N records will be repeated in every page. Where N depends on how many line will fit in the height of the page footer.
Still need some help on how to limit record in subreport....