0
votes

How can I stop GroupHeader being repeated when KeepTogether forces the group to the next page? I've found a variety of posts around on how to make headers repeat.. not so many on avoiding it.

This is a large report that has been pieced-together (by me, I admit) over time as needs arose. I group first by one sorting variable, then by another, and then I have several groups on hte same database field. The reason for several groups with same field is to be able to have show, size and sequence control on a variety of actions. I don't claim it's the best way to do it, just the one I came up with. The following is a simplified layout
sort1 group1 header
sort2 group2 header
ID group3 header - hidden section. initializing variables
ID group4 header - subreport with nothing shown
ID group5 header - hidden section. formulas doing math to variables using data from subreport
ID group5 footer - section that shows. title info about ID, including from variables
ID group4 footer - subreport that shows up with sales info
ID group3 footer - subreport that shows up with components info
sort2 group2 footer
sort1 group1 footer

Group2 header has Repeat on all pages. Group3 has KeepTogether selected. I also have KeepTogether checked for each section and for every subreport, which first happened (against my space-conserving desires) due to footer5 showing near bottom of page, footer4 not showing anywhere(grr), with footer3 on the next page making the MIA 4 easy to not notice. That all seemed to be working fine.

I'm now adding a feature, and as I hunt for its bugs, discover that header 3 is being repeated when group3 (represented by footer5) is at the end of a page and gets shifted to next page for fit.

I tried to have the headers Suppress on InRepeatGroupHeader, but that did not do as I expected (I seem to remember being disappointed in that function in the past too). I started to try to have simply Copies of group3 header instead of multiple groups, but then I can't select hide for one and show for the other...

I'd be grateful for any ideas to try out. HS

PS. I also tried using a flag variable to show where had been (increment a numbervar by 1 whenever done a formula), and have hte initializing formula check it before running, and then reset it to zero in the group3 footer. >> When a group did the jump page thing, I watch the flag go from 0 to 2 to 4.. and then it's suddenly back at zero (at hte spot where it goes from normal behaviour to restarting group process... so I'm guessing it's doing the formulas it finds in group footers even after it's realized it won't fit on one page, and only after that goes on to the next page and redoes the whole group.

PS#2 (answering Siva's question
page 1 start here
sort1 group1 header
sort2 group2 header
ID group3 header - hidden section. initializing variables
ID group4 header - subreport with nothing shown
ID group5 header - hidden section. formulas doing math to variables using data from subreport
ID group5 footer - section that shows. title info about ID, including from variables
ID group4 footer - subreport that shows up with sales info
ID group3 footer - subreport that shows up with components info
ID group3 header - hidden section. initializing variables
ID group4 header - subreport with nothing shown
ID group5 header - hidden section. formulas doing math to variables using data from subreport
ID group5 footer - section that shows. title info about ID, including from variables
ID group4 footer - subreport that shows up with sales info
ID group3 footer - subreport that shows up with components info
ID group3 header - hidden section. initializing variables
ID group4 header - subreport with nothing shown
ID group5 header - hidden section. formulas doing math to variables using data from subreport
ID group5 footer - section that shows. title info about ID, including from variables
>>>page 2 might starts here
I would like it to do this
ID group4 footer - subreport that shows up with sales info
ID group3 footer - subreport that shows up with components info
ID group3 header - hidden section. initializing variables
ID group4 header - subreport with nothing shown
ID group5 header - hidden section. formulas doing math to variables using data from subreport
ID group5 footer - section that shows. title info about ID, including from variables
ID group4 footer - subreport that shows up with sales info
ID group3 footer - subreport that shows up with components info
ID group3 header - hidden section. initializing variables
ID group4 header - subreport with nothing shown
>>>and then page 3 might start here
I would like it to do this, or at least have something that I can use to suppress all actions in 'repeated' sections
ID group5 header - hidden section. formulas doing math to variables using data from subreport
ID group5 footer - section that shows. title info about ID, including from variables
ID group4 footer - subreport that shows up with sales info
ID group3 footer - subreport that shows up with components info

1

1 Answers

0
votes

Lenghty explanation of the issue to the extent I understand use below solution.

on the supress section of group header3 write below formula.

if pagenumber<>1
then true
else false