Page Breaks for last 5 records

  • Thread starter Thread starter S
  • Start date Start date
S

S

Hello,

I have a report that is grouped on [SessionNum] with many records under each
[SessionNum]. The records are sorted ascending by [EntryNum].
What I would like to do is insert a page break on the last 5 records of each
[Session].

Is there cody that could be written for this?
 
S said:
I have a report that is grouped on [SessionNum] with many records under each
[SessionNum]. The records are sorted ascending by [EntryNum].
What I would like to do is insert a page break on the last 5 records of each
[Session].


Strange thing to do, but not all that difficult.

Add a text box (named txtLineNum) to the detail section.
Set its expression to =1 and RunningSum to Over Group.

Add another text box (named txtDetailCnt) to the group
header section. Set its expression to =Count(*)

Add a Page Break control (named pgBreak) to the top of the
detail section.

Add a line of code to the detail section's Format event
procedure:
Me.pgBreak.Visible = (Me.txtLineNum = (Me.DetailCnt - 5))
 
Back
Top