Print Search Rate
    
   06-19-2003, 12:00 PM
How to Force a New Page After 'X' Number of Records Per Page

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


GrapeCity » Frequently Aske... » ActiveReports 2... » How to Force a New Page After 'X' Number of Records Per Page
Privacy Policy | Copyright © 1997-2012 — GrapeCity, inc.
All trademarks mentioned are the property of their respective owners.