Bug with group headers?

Erik van der GaagErik van der Gaag New Zealand
edited 12:12PM in FastReport 4.0
Hello,

We have a problem with our reports, in that we have several group headers for the master data, and we do not want to keep the detail together. ? However the group headers are appearing on the previous page with no data. ? turning on 'keep together' for the group header fixes that problem, but then causes the problem of having huge white space on the pages.

There is the propery on the master data 'Keep header together', but this doesn't seem to do anything.

Here is an example of this happening:

In the Main Demo application, Nested Groups example (3.fr3). ? Design the report, and enable 'Reprint on new page' option for the group headers. (as we want this feature).
Preview the report.

At the bottom of page 12, the group header is displayed, and then repeated on the next page.

How can I avoid this problem?

Thanks very much.
-Erik.

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 12:12PM
    add code in the obp event of the header to check the free space and force a new page.
    if engine.freespace < headerbandname.height + masterdata1.height then engine.newpage;
  • Erik van der GaagErik van der Gaag New Zealand
    edited 12:12PM
    Cool, this looks like it will do the job.

    Is this a bug though? ? Shouldn't the 'Keep Header Together' option do this for you?

    Thanks for you help.
    Erik.
  • gordkgordk St.Catherines On. Canada.
    edited 12:12PM
    the drawback of keep together is that it produces large white space. some times it is a slight amount of freespace > the height of the header, a lot depends upon height of page footer, sometimes increasing the height of page footer by 1 or2 pixels can solve it. probably slight cumulative error due to heights of header bands and masterband previously output. Clue if no stretching bands, look at the output page where it happens add the the heights of the bands that have been output and compare to freespace value when first band starts to print.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.