Search code examples
delphilayoutreportquickreports

How to make QR Page Footer or Band to be under Band Details not at the page end?


I need to make report, that has summary after Details had printed, not after every each Detail.

I only know the Page Footer, but it's at page bottom not after the Detail Band.

Is there a QRBand that could go after Detail Band? Or can you make PageFooter height resize on every page?


Solution

  • Summary Bands print only at the end of the report immediately after the last 'detail' (unless the AlignToBottom property is set to true).

    You should add a TQRBand to the report and set the BandType property to rbSummary.


    EDIT

    If you need to show intermediate results on every page you could add the FooterBand and the SummaryBand.

    enter image description here

    Summary Bands prints only at the end of the report (last page) and you can use the BeforePrint event of the summary to disable the footer band.


    EDIT2

    You can also try with a QRGroupBand and a QRFooterBand.

    In the GroupBand:

    • use the Expression property for separating one group of products from another (the band could also be empty)
    • set appropriately the FooterBand property. This is where you link the header band to the correct footer band and encapsulate your group inside. Place the header band first and then go back and place the footer band by dropping a QRBand component and immediately changing the Type from rbTitle to rbGroupFooter. Once you have done this, you can go back to the QRGroup header and select the right footer band to use.

    The FooterBand is where you are printing summary totals for each product.