Hi
You can try using the special field RecordNumber to determine the current line number. That should work as long as you aren't conditionally suppressing any detail sections.
If you need to know the # of detail lines per group, you can do it with 2 formulas:
//@Init
//Put this in your Group Header
//(If you want to get the # of lines per page,
// then you can put this in the Page Header instead)
WhilePrintingRecords;
NumberVar lineNum := 0;
//@Increment
//Put this in your Details section
WhilePrintingRecords;
NumberVar lineNum := lineNum + 1;
To force a page break after a certain line number, use a formula for 'New Page After':
WhilePrintingRecords;
NumberVar lineNum;
If lineNum = [whatever your Max is] Then
True
Else
False
hope this will help you in some way
cheers
pgtek