Can't seem to keep a group together so header on one page and data on another

ee00cc258cdbfd25bb1ef15c8d02a0c0.png

I have a report with LargeDesignHeight = TRUE

When I go to view or print I am having issues clustering sections to try their best to keep together so things like the header don't get split apart across pages.

The last section is layed out like this. Please ignore the misaligned data and missing data. I just started this section and ran into this problem.

Header < visible >
Group Header < not visible, just needed to group by invoice number >
MasterData < not visible, my data >
Group Footer < visible, shows basically sum of data >
Footer < visible, will eventually be a sum of everything >

In this instance Header is on one page while everything else is on next page. I can't seem to keep it together.

Comments

  • edited October 2017
    I found I can do this... which requires me to do this on every header. It "worked" but not 100% sure if this is the best way. I would think it would be something in the report designer by now to enable such a feature?
    procedure  HeaderNetSalesOnBeforePrint(Sender: TfrxComponent);
    begin
     if Engine.FreeSpace <= HeaderNetSales.Height + MasterDataNetSalesIncludingTax.Height + PageFooter1.Height then
            Engine.NewPage;
    end;
    


    I can see this leading to some cases maybe of wasted space where the MasterData section may span 2 pages because of so much data. So would move to another page in this case, while wasting a bunch on the previous?

    Before


    3b82c6cec9bc1751165594172204cc7f.png


    After

    4ca51d0e2b4a2eb051d9e9fd0353ace4.png

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.