ReportSummary bottom alignment

edited 11:21AM in FastReport 4.0
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

Comments

  • edited 11:21AM
    Ive been searching for a solution to this for years.

    Still none.
    PeterHer wrote: »
    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
  • gordkgordk St.Catherines On. Canada.
    edited 11:21AM
    "-summary (aligned to bottom, just on top of the pagefooter)"


    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.

  • edited 11:21AM
    PeterHer wrote: »
    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).
    You can manage the visibility of the components on the page footer with code.

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.