PageFooter1.OnAfterPrint makes FastReports crash
Hello,
I would like to display a page containing the same text after displaying each "normal" page containing a MasterData band (so there would be the datas on the recto and the text on the verso of each page).
I know at least one question like this has been asked on this forum before, but it was in 2009 so maybe some things changed, for example the available duplex options don't seem to be the same.
A solution I was thinking about is to call a code like
But each time I call PageFooter1.OnAfterPrint (or OnBeforePrint), previewing the report makes FastReports crash. Is there a reason to that ? Is it the expected behavior from FastReports ?
Of course, any suggestion allowing me to achieve what I want in an other way is welcome. My main problem is that a row of MasterData is likely to be quite long, and I want to be able to split it (so there could be a text page inserted in the middle of a masterData row). Maybe I should post an other topic for that ?
regards,
Florent
I would like to display a page containing the same text after displaying each "normal" page containing a MasterData band (so there would be the datas on the recto and the text on the verso of each page).
I know at least one question like this has been asked on this forum before, but it was in 2009 so maybe some things changed, for example the available duplex options don't seem to be the same.
A solution I was thinking about is to call a code like
Engine.NewPage;
Engine.ShowBand(PageHeader2);
Engine.NewPage;
In the OnAfterPrint method of PageFooter of Page1, with the possibility to replace PageHeader2 with whatever I want later.But each time I call PageFooter1.OnAfterPrint (or OnBeforePrint), previewing the report makes FastReports crash. Is there a reason to that ? Is it the expected behavior from FastReports ?
Of course, any suggestion allowing me to achieve what I want in an other way is welcome. My main problem is that a row of MasterData is likely to be quite long, and I want to be able to split it (so there could be a text page inserted in the middle of a masterData row). Maybe I should post an other topic for that ?
regards,
Florent
Comments
I didn't get any answer about PageFooter1 's behavior, but I finally found a solution to my problem by myself and with some help from the Fastreport support, so I write it here in case that could help someone one day.
For me it consists of making a Page2 with just an empty header and a child attached to it, which contains my "verso page".
Then I added the code
That way if the content of Page1 normally takes 3 pages, the visual result will be
Page1
Page2
Page1
Page2
Page1
Page2
with the same content for Page2 each time it's printed, which is what I want.
You can also do lots of things from Delphi or C++, playing with the previewPages attribute of your TfrxReport like here https://www.fast-report.com/en/blog/151/show/
regards,
Florent