cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to have neither orphan headers nor widow records?

Former Member
0 Kudos

This has been a long running issue, and I've read lots of thread for solutions. I've tried the solutions for orphan group headers and widowed records, but I can't seem to eliminate both at the same time. Due to repetitious data, my main data is in GH2 and GH3.

Solution #1: I placed the headers in GH1 to repeat on each page. The data went into GH2a, GH2b, and GH3. GH2b and GH3 had identical data. I placed a counter formula in GH3, and suppressed if the counter = 1. I then set GH2 to keep together. This guarantees that the headers appear on every page, but I'm left with orphan headers.

Solution #2: I placed the headers in GH2a and the data in GH2b, GH2c, and GH3. I set GH2 to keep together. I placed counter formulas in GH2a, GH2b, and GH3, and suppressed as necessary. This guarantees that I never have an orphan header, but then there are no headers at the top of the next page. It's the data in GH3 that appears on the second page without headers.

All of the threads that I've read recommend either one or the other, but is there a way to have both? Solution #2 seemed to be the most popular for eliminating orphan headers, but then how do I get the titles to appear on the next page?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

http://scn.sap.com/thread/3176376

From searching other threads, I think I've found the answer in the link above. I ended up expanding on my Solution #1. I added another GH1, and for GH1a suppressed inrepeatedgroupheader, and for GH1b suppressed Not(inrepeatedgroupheader). That seemed to do the trick! No more orphan headers or widowed records.

abhilash_kumar
Active Contributor
0 Kudos

Thanks for sharing the solution, Ahren.

-Abhilash

Former Member
0 Kudos

Hi Abhilash. after more thorough testing, the InRepeatedGroupHeader solution did not work, as it left behind orphan headers. So I'm back to where I started. For now, I'm using my solution #2 from above to eliminate orphan headers, but I can no longer have titles appear on the top of the next page. Any advice?

Also, an added challenge is that I've been asked if I can not have a single record appear on the bottom of a page. There should be at least 2 records together, just below the titles. Is that possible? Thanks!

abhilash_kumar
Active Contributor
0 Kudos

Hi Ahren,

A few screenshots could be helpful!

-Abhilash

Former Member
0 Kudos

Hi Abhilash. From my original thread, here is my design of Solution #1:

By repeating GH1 on every page, I always have the titles at the top of page 2. Sometimes, however, I end up with just the titles sitting alone on the bottom of page 1.

Here's my design of Solution #2:

By placing the titles and data in GH2a, GH2b, and GH2c and Keep Together, I no longer have an orphan header at the bottom of page 1. Unfortunately, I can no longer have my titles repeat on every page.

Thanks for any advice!

Former Member
0 Kudos

Hi Abhilash,

I've searched many threads as I feel this should be doable. Have titles repeat on each page, while also not having orphan headers. If this has been solved already, could you direct me to the right thread? I've tried many combinations, but nothing works. Thanks!