ReportSummary bottom alignment
Hi All,
I need to create a report that has a
reporttitle (top align) on the first page,
pageheader
masterdata in the middle
and a pagefooter (bottom align) on all the pages.
The problem is the pagefooter on the bottom of the page.
It occurs on every page which is good,
but on the pagefooter section there is also some data that only needs to be printed (and shown in preview) on the last page.
Unfortunately I cannot create a second pagefooter, otherwise I could set one to (print on first and last page) and the other one to (print on last page).
So I have tried to put the data that needs to be printed on the last page in a reportsummary but the text is aligned to the top of the page and not to the bottom.
I also tried to do some other coding stuff in the OnBeforePrint and OnAfterPrint events, but without success.
With this I had a pagefooter set to print on first and last page and set visible of the memo objects to false when the first page was printed, but I didn't realy understand how to know which page is printed when the OnBeforePrint and OnAfterPrint events happened.
Another problem with this methode is that when a pagefooter is set to print on last page and print to first page is disabled the masterdata stop where the pagefooter section begins. This is strange because I set print to first page to false. Even if the pagefooter is set to be not visible the masterdata stop at the pagefooter section.
So my question is is it possible to create a report which has result as (2 pages)
first page
-reporttitle
-pageheader
-masterdata
-pagefooter
last page
-pageheader
-masterdata
-summary (aligned to bottom, just on top of the pagefooter)
-pagefooter
If all data fits on just one page the result must be
-reporttitle
-pageheader
-masterdata
-summary (aligned to bottom, just on top of the pagefooter)
-pagefooter
Any ideas?
Thanks in advance.
Peter
I need to create a report that has a
reporttitle (top align) on the first page,
pageheader
masterdata in the middle
and a pagefooter (bottom align) on all the pages.
The problem is the pagefooter on the bottom of the page.
It occurs on every page which is good,
but on the pagefooter section there is also some data that only needs to be printed (and shown in preview) on the last page.
Unfortunately I cannot create a second pagefooter, otherwise I could set one to (print on first and last page) and the other one to (print on last page).
So I have tried to put the data that needs to be printed on the last page in a reportsummary but the text is aligned to the top of the page and not to the bottom.
I also tried to do some other coding stuff in the OnBeforePrint and OnAfterPrint events, but without success.
With this I had a pagefooter set to print on first and last page and set visible of the memo objects to false when the first page was printed, but I didn't realy understand how to know which page is printed when the OnBeforePrint and OnAfterPrint events happened.
Another problem with this methode is that when a pagefooter is set to print on last page and print to first page is disabled the masterdata stop where the pagefooter section begins. This is strange because I set print to first page to false. Even if the pagefooter is set to be not visible the masterdata stop at the pagefooter section.
So my question is is it possible to create a report which has result as (2 pages)
first page
-reporttitle
-pageheader
-masterdata
-pagefooter
last page
-pageheader
-masterdata
-summary (aligned to bottom, just on top of the pagefooter)
-pagefooter
If all data fits on just one page the result must be
-reporttitle
-pageheader
-masterdata
-summary (aligned to bottom, just on top of the pagefooter)
-pagefooter
Any ideas?
Thanks in advance.
Peter
Comments
Still none.
procedure ReportSummary1OnBeforePrint(Sender: TfrxComponent);
begin
if engine.freespace > reportsummary1.height then
begin
Engine.CurY := Engine.PageHeight -reportsummary1.height -pagefooter1.Height - 1;
end;
end;
OR IF STRETCHING DO IT HERE
procedure ReportSummary1OnAfterCalcHeight(Sender: TfrxComponent);
begin
Engine.CurY := Engine.PageHeight -reportsummary1.height -pagefooter1.Height - 1;
end;
you can always use an unattached child band with duplicate memos of what you want
to display and use the engine object's showband(Bandname) method, to achieve special output.