Skip to Content
avatar image
Former Member

Unintended gap between nested reports in PowerBuilder Classic

I have 3 freeform datawindows, named A, B and C. C is a nested report of B, B is a nested report of A and A is a main report.

Report A is very simple, and has only one nested report B in it (in real life there are more, but one is enough to show my point).

Report B has a header, and in details band has many copies of C so that report B does not fit a single page (in real life there are many different reports, this is just for simplicity).

Now if I preview report B, everything is OK, I see the header on every page, and nicely arranged nested reports, but if I preview report A, on the second and later pages there is a gap the size of B header between first and second nested reports of that page:

Tested with PowerBuilder 11.5 and latest PowerBuilder 12.6 Classic.

I wanted to attach PDF and PBL files containing mentioned example if someone would like to test themselves but was unable to do so, You can find those file in my dropbox folder over here: Dropbox.

P.S. Thread copied from SAP PowerBuilder as adviced by Bruce Armstrong

Gap.png (3.6 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Jan 07, 2015 at 10:14 PM

    hi, have you tried the slide up (directly above) and autosize height options in position tab page

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 07, 2015 at 11:10 PM

    I've had good results with nested reports by making the height container for each embedded report very small and move them close together.  I mark the Autosize Height checkbox (on the Posistion tab of the properties for the report container) and set the Slide Up value to Directly Above.  You'll also need to set the detail band to Autosize.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      I have exactly the same setup, you can see it in supplied Test.pbl, I also tried altering B headers autosize checkbox on and off, got same result.

  • avatar image
    Former Member
    Jan 08, 2015 at 01:47 AM

    if you have autosize height to header or footer bands in report C you can confuse report B...

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      I tried switching off the autosize of the header, got the same result.

      With footer, on the other hand, I have no issues, that is why I did not include it in the example.

  • avatar image
    Former Member
    Jan 15, 2015 at 04:29 PM

    I think this may be a bug in the datawindow, but I don't know for sure. Here's a few things I tried and noticed:

    - If you add more C datawindows to B, the effect seems to occur on every page beyond page 1 (or at least 2 and 3, since I didn't add more past that page count).

    - The size of the gap matches the size of the header in B. Turning off autosize and changing the height of the header also changes the height of the gap.

    - Setting the header on B to 0 makes the gap disappear (consistent with the above point about the height being related to the header)

    So it seems that the datawindow painter is unnecessarily adding a "2nd header" to pages across which the detail band extends via autosizing.

    We ran into something that sounds similar just recently with PB 11.5 and 12.5. We had a child report that was in a detail group that in a few instances ran across multiple pages. For some reason, when it extended onto a second page, the first new instance on the next page extended its header over top of the previous instance. In our case, it was covering up data and that's how we found it. Yours isn't quite the same since you don't have any groupings (we fixed ours by clicking the "Suppress Group Header" checkbox).

    Is it possible to move the B detail data into a group header on A so that B has no header at all?

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      I also think it's a bug and was hoping to get some attention from SAP employees here.

      And no, every instance of B has a unique header and they can not be moved to A.

      I could make header on A different on every page for specific page numbers, but B sizes differ and I do not know for sure how many pages one or other instance of B will take.