PageFooterBand is working at one record later tthan Masterband
Hello.
Are trying to make an Invoice report.
I have a MasterBand connected to the qry Payers.
Then a DetailBand wih details of what they are paying for, in qry OrderDetails.
After that I have a PageFooterBand with FooterAfterEach and components showing the same queries
and fields as the MasterBand. (Components are in design time copied from the MasterBand to the PageFooterBand)
If I print only one invoice, the data in the MasterBand components and the PageFooterBand components
are the same.
When I print the whole query, then it starts with the MasterBand components printing the first record,
but the same components on the PageFooterBand is printing the second record, and so through the whole table
to the end, where the PageFooterBand components is printing the same record twice.
Any suggestion appreciated.
(I want the both set of components to print from the same record, also when printing them all.
[img]style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> Kai Inge[/img]
Are trying to make an Invoice report.
I have a MasterBand connected to the qry Payers.
Then a DetailBand wih details of what they are paying for, in qry OrderDetails.
After that I have a PageFooterBand with FooterAfterEach and components showing the same queries
and fields as the MasterBand. (Components are in design time copied from the MasterBand to the PageFooterBand)
If I print only one invoice, the data in the MasterBand components and the PageFooterBand components
are the same.
When I print the whole query, then it starts with the MasterBand components printing the first record,
but the same components on the PageFooterBand is printing the second record, and so through the whole table
to the end, where the PageFooterBand components is printing the same record twice.
Any suggestion appreciated.
(I want the both set of components to print from the same record, also when printing them all.
[img]style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> Kai Inge[/img]
Comments
When you only have one record, it stays on the same record after the DataSet.Next so the data in the PageFooter is the same as the data in the header. When printing multiple records, the DataSet.Next navigate to the next row of data, so the data in the PageFooter is not the same as the data in the header.
To solve your problem, I see two options.
1) You can use a different band type, like a GroupFooter. To be able to use a GroupFooter, you need a GroupHeader to define the break condition. If you don't want to see it, put his height to 0. It is possible to force a static position to a band, but it is a bit more complex.
2) You can store the value that you want to show on the PageFooter in a variable on the event of your choosing (ie: BeforePrint of the DataBand).
I will try solution 2 and see if I can manage the data that way, but it's seems a bit peculiar that Fast Report do not directly allow to print data from the Masterband whereever needed on a page, without having to use workarounds as this?
I would believe this is a daily need in reports.
A single footer databand designed for this, that is not affected by the dataSet.next command seems mandatory to me, so why does it not exist in an advanced tool like Fast Report I don't understand. :-)
Thank you for the solution.
If I fail to use it, I will be back. :-)
[img]style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> Kai Inge[/img]
However, I do agree that it would be more simple if they had a footer band that can print after the details.