|
The following code can be used to force a page break after a set number of detail records. Keep in mind that this only works if your report will fit the selected number of records onto a single page, and is best used with strongly defined section sizes (IE - CanGrow and CanShrink are both set to false for the section so it's size will not be altered by the report engine at runtime.)
Dim lnCount As Integer
'Initialize variable Private Sub ActiveReport_ReportStart() lnCount = 1 End Sub
Private Sub Detail_Format() 'change 16 in the following line to the number of records per page desired
If (lnCount Mod 16) = 0 Then Detail.NewPage = ddNPAfter Else Detail.NewPage = ddNPNone End If
lnCount = lnCount + 1 End Sub
|