Stretching MasterData to complete page height

edited 4:49PM in FastReport 4.0
Hi,

I'm fairly new to FastReports and have a problem which I cannot solve by myself...

I have designed a simple report with page-header and -footer and one MasterData band. The lines of the masterData have alternating colors (white/grey) - it's done like described in the manual. If the dataset only returns for example 5 rows the 5 rows appear as expected, but there's a big white gap until the footerband begins. I would like to continue printing the row's background until the page is full. And - if the query returns Data for 1 and a half page it shall print background until the second page is full (and so on)...

Has someone here an idea how to do this?

Backgroud information: the report is a standard parts-list for a repair/overhaul. The mechanics can add addional parts by simply writing them on the paper and they should be helped by the lines... that makes life easier for the storeman...

Thanks in advance for any hint [img]style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> Regards Justin[/img]

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 4:49PM
    This is not really stretching, but filing space between last record and page bottom
    add an unattaced childband with a text object sized to what you want turn on bottom frame line of text object. you might want to have a 0 height header footer for the masterddataband to have their events available. for use. using the obp event of the footer write code using the engine object to check the freespace left and if > childband height call engine.showband(child1).
    while engine.freespace > child1.height do
    begin
    engine.showband(child1);
    end;
    create a global integer variable at the begining of the code page to use for the condition prop of the text object in the child band, you can initialize its value to the value of the line# var +1 in the obp of the footer. and increment it in the oap of the child band.
  • edited 4:49PM
    Thanks Gordk,

    I will give it a try during the next days... I see there's a lot to learn [img]style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" /> Regards Justin[/img]
  • gordkgordk St.Catherines On. Canada.
    edited 4:49PM
    Justin
    There is a fair amount to learn but it is actually easy once you pick up on the concepts.
    read the user manual as working from inside the report, the programmers manual as working from delphi. The biggest things to learn are where and when bands print(output) to finished page, and when the events of objects fire. In brief bands output from the top down depending upon the type of band, and its property settings
    and the objects within the band are processed in their order of creation. Bands are just place holders on a design page, size and positon of the band in the design page does not have a direct relation to where it will be output to the finished page, that position is dependant upon the requirement's of the
    bands and objects that have been previously processed by the engine.
    you will find some good demos in the binaries news group.
  • edited 4:49PM
    gordk wrote: »
    Justin
    There is a fair amount to learn but it is actually easy once you pick up on the concepts.
    read the user manual as working from inside the report, the programmers manual as working from delphi. The biggest things to learn are where and when bands print(output) to finished page, and when the events of objects fire. In brief bands output from the top down depending upon the type of band, and its property settings
    and the objects within the band are processed in their order of creation. Bands are just place holders on a design page, size and positon of the band in the design page does not have a direct relation to where it will be output to the finished page, that position is dependant upon the requirement's of the
    bands and objects that have been previously processed by the engine.
    you will find some good demos in the binaries news group.
    Dear gordk

    everything is OK except in the case that we have a GROUP footer.
    In this case when you use the Engine.ShowBand(xBand) then the totals are not calculated
  • gordkgordk St.Catherines On. Canada.
    edited 4:49PM
    what build# of fr4 and more info about which event of which object(band) you are using to
    call the showband method
  • edited 4:49PM
    gordk wrote: »
    what build# of fr4 and more info about which event of which object(band) you are using to
    call the showband method
    I 'm using 4.7.65

    The code that is executed on the report is

    procedure GroupFooterOnBeforePrint(Sender: TfrxComponent);
    begin
    while Engine.FreeSpace > (ChildLR.Height+GroupFooter.Height+1) do
    begin
    Engine.ShowBand(ChildLR);
    end;

    { Engine.CurY := Engine.PageHeight - GroupFooter.height - 5; } this is working correct
    end;

    The Group Footer is printed but the totals No . All other simple memo are printed correct
    If i use the last line inside the brackets then the GroupFooter band printed with the correct totals
  • gordkgordk St.Catherines On. Canada.
    edited 4:49PM
    Oops i missed the groupfooter bit
    yes that is true the sample code does not work when using grouping, and it was not meant to.

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.