Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Keep Group Together problem!!! HELP...

Status
Not open for further replies.

kaelin

Programmer
Jun 24, 2003
2
US
I have a report with 3 groups, and I display the actual data in the detail section. I display Group 1 and Group 3 header, and supress Group 2. I separate each records by a horizontal line in the detail section. I have also added vertical lines to separate the columns. These vertical lines are drawn from the Group 3 section and ends at Group 3 footer section.

If there are numerous records in the third group, it pushes the start of the 3rd group header and the details to the next page in the main report, leaving a big white space on the previous page. I unchecked Group 1's "Keep Group Together" option. Now, the white space is gone. However, the Group 1's header is now printed on a different page than the Group 3 header and the contents in the detail section.

My question is how can I display Group 1's header together with Group 3 header and the detail section content?

Also, since the vertcal lines are drawn across the detail section from Group 3 header to Group 3 footer, the vertical lines did not end properly. It is drawn beyond the last record displays on the first page.

Please help.

Thanks,
Kaelin
 
Kaelin

Difficult to visualise your problem.
Try the following

1 In group 1 change group window,flag the box repeat group header on new page, that will then repeat with your group 3 header.

2. Try breaking the vertical line into 3 sections, one each for the header, detail and footer.

Ian Waterman
UK Crystal Consultant
 
orphaned headers are always a problem

we have had several posts on the subject. The best solution I have found is to:

1. remove all "keep togethers" on groups
2. The group header ALSO shows the first detail line

That is ...you make a fake detail line in the header this way the header is never orphaned from the details. I generally disable "repeatGroupHeader" when I do this but you can get around this too if you must by putting the first detail in a Group header subsection and suppressing it if the header is repeated.

So essentially you place a copy of the "detail" section in the header section. You put a conditional suppress on the detail section such that it will suppress the details for the first record of that group.

This is done by creating a flag formula and placing it suppressed in the Group header

//@Flag
WhilePrintingRecords;
NumberVar Flag := 0;

In the detail section conditional suppress you put the formula

WhilePrintingRecords;
NumberVar Flag;

if Flag = 0 then
(
Flag := 1;
True;
)
else
False;

This will suppress the first record and reset the Flag so it won't suppress details for the rest of the group.

This works very well actually...you will have to adapt it a bit for multiple group headers but this is the essence of the approach.

Jim Broadbent
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top