Stretching MasterData to complete page height
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]
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
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.
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]
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.
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
call the showband method
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
yes that is true the sample code does not work when using grouping, and it was not meant to.