Group-Report: Page footer shows wrong info

edited 7:21PM in FreeReport
Hi,

FreeReport 2.33, Delphi 4.

I've created a report with groups which should print a list of delivery notes and per delivery note each order line. For each new order no. a new page is created. Because of the amount of order lines, some delivery notes consist of several pages.

Here is the report:
GROUP HEADER
condition = order no.
print = order no., customer, ...

MASTER DATA
datasource = frDBDataSet
print = order line no., article, amount, sales price, ...

GROUP FOOTER
print = Total amount of order - Sum(amount)

PAGE FOOTER
print = Total amount of page, comment as order info
What is working correctly?
Each new delivery note is printed to a new page. Fine:)

What isn't working?
The comment of the order which is printed in the page footer belongs to the delivery note of the next page.

Up to now I bypassed this problem by placing the comment field in the group header.
But there must be a solution to place the data in the page footer of a group report, isn't it?

Can anybody help?

Greetings,
Peter

Comments

  • edited October 2017
    I'm having a similar problem - Delphi 10.1 Berlin; FastReport 5.6.2, Windows 7 Ultimate SP1 64 bit (32 bit Delphi project / compilation)

    I have no grouping, just a PageHeader, MasterData and PageFooter band. A TfrxMemoView in the page footer is connected to a singe dataset. The problem is that it always shows the value from the next page, e.g. page 1 has the value that should appear on page2, etc. The last and second-last pages both show the data value from the last page. When I move it up into the MasterData band, it works correctly.

    I tried to work around it by not linking it to a data field, but writing the value in the OnBeforePrint event, and it does exactly the same. It's as if the Memo is somehow linked and rendered by the next page.
  • gpigpi
    edited 7:21PM
    Try to check Engine.FreeSpace in the TfrxMasterData.OnAfterCalcHeight event and call Engine.NewPage if free space is not enought

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.