Suppress New Page for First Group
Hello
I have a report containing a sub report which is split into several groups. The customer has asked if the first of these groups can be set to start a new page - except for the first traversal of the group data, which needs to follow on below the short report header (another group header but outside the sub report).
I've set my group to 'Start a New Page' in the Groups dialog - but I can't work out out a method of stopping the new page if the Group.BreakNo is 0 - which identifies the first pass.
Any idea of which event I could use to control Group.NewPage?
Thanks in advance
Rod
I have a report containing a sub report which is split into several groups. The customer has asked if the first of these groups can be set to start a new page - except for the first traversal of the group data, which needs to follow on below the short report header (another group header but outside the sub report).
I've set my group to 'Start a New Page' in the Groups dialog - but I can't work out out a method of stopping the new page if the Group.BreakNo is 0 - which identifies the first pass.
Any idea of which event I could use to control Group.NewPage?
Thanks in advance
Rod
Comments
Which version of ReportBuilder and Delphi are you using? How are you currently trying to suppress the Group.NewPage (which event)? Are you using RAP?
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
The RB version is 18 (Enterprise) / Delphi 10.1
However, I was hoping to use RAP to do this as I think we have other customers who would benefit from such a facility. I've attempted to add code to the BeforePrint and Before and AfterGenerate events of the group header for the group in question, the OnPrint event of the sub report and the Before and AfterGroupBreak events of the group I'm trying to control.
Each time I've tried to check the value of Group.BreakNo. Outputting Group.BreakNo to a variable in the header band of the group proves that this property is updating correctly, but I don't know which event fires before the page break is set.
Hope you can help
Rod
This is a timing issue. You will likely need to manually look ahead in your dataset to see if the group is about to break in order to set the NewPage property early enough to have the effect you are after. In RAP, this will require a pass-thru function.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I'll see if the customer has deep enough pockets :-)
Rod