FLCoderMike
Registered User.
- Local time
- Today, 06:55
- Joined
- Nov 14, 2007
- Messages
- 29
I have a report that has to have a page break set for a specific number of years printed, these years are summed up in a column for each record, each record can have as few as 1 and up to 4 years in it, I then sum this column up in the report and get a number which I have in the report footer in a contrtol named yearCount, I have tried various formatting tricks like
And similar; like setting a pagebreak visiblity to true or false based on the value of yearCount. This only causes the report to print single rows on the given number of pages, no good for me. What I need to do is have the report print out the records sum the yearCnt column and start a new page and a new yearCount for every 50 counted.
Any ideas?
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.yearCount = 50 Then
Detail.ForceNewPage = 2 ' after section
Else
Detail.ForceNewPage = 0 ' none
End If
End Sub
And similar; like setting a pagebreak visiblity to true or false based on the value of yearCount. This only causes the report to print single rows on the given number of pages, no good for me. What I need to do is have the report print out the records sum the yearCnt column and start a new page and a new yearCount for every 50 counted.
Any ideas?