1. Daniel Vivier
  2. PowerBuilder
  3. Tuesday, 5 March 2019 21:56 PM UTC

We have a DW report with a Summary section with height 0 but autosize height, which can be varying heights depending on the data.

We have found that PB tries to always keep the Summary section together on one page, but will never put it alone on the page - it always includes at least a few lines of the details (or group trailers etc.) along with it. The result of that is that it can leave a huge amount of white space on the previous page.

Is this a known behaviour? Anything we can do about it? I can't find the words "widow" or "orphan" in the program's Help, so I'm pretty sure there is not an obvious setting we can use to control this. I guess my preferred behaviour would be for it to put all of the main data on the previous page, if it fits, and then move the summary onto the next page, if it won't all fit in the rest of that previous page.

Thanks.

Olan Knight Accepted Answer Pending Moderation
  1. Tuesday, 5 March 2019 23:28 PM UTC
  2. PowerBuilder
  3. # 1

 

The ONLY way I've ever made that happen is when the reports have fixed-size lines in them.
At that point, we determined the maximum number of lines for a page = Total_Lines_For_A_Page.

Now you can add up:

   lines in the header, if any +
   lines in the detail band, if any +
   lines in the group bands, if any ==> total_lines_on_page_less_summary

To see how much detail to add to a page, you can look at the number of lines in the Summay, and be sure to include the spacing you want between the detail and the Summary

  Total_Lines_For_A_Page - total_lines_in_summary = lines available for the detail band


This allowed us to determine how many detail lines we could have on a single page and still get the summary onto the same page.

Your case is similar, you can take

Total_Lines_For_A_Page - total_lines_on_page_less_summary - availble_lines_on_page

IF (total_lines_in_summary  > availble_lines_on_page) THEN

  

END IF


Olan

Comment
  1. Daniel Vivier
  2. Wednesday, 6 March 2019 00:15 AM UTC
Thank you for these thoughts, Olan. Unfortunately this report is an Income Statement, based on our users' charts of accounts, so how many lines they have will depend on their own data and is completely unpredictable. Even the length of the summary depends both on their specific data and some choices they make when selecting to run the report.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.