Adjusting footer height based on record count
I want to adjust the height of the footer band based on the # of records in the details band. I have looked at the manuals and examples and can't seem to get this to work. The code below gives me the error - ')' expected - .
procedure FooterDetails1OnBeforePrint(Sender: TfrxComponent);
begin
footerDetails1.height:= (266-([COUNT(DetailData1)]*.5)*(35.5));
end;
Any suggestions would be appreiciated. Thanks
Glen
procedure FooterDetails1OnBeforePrint(Sender: TfrxComponent);
begin
footerDetails1.height:= (266-([COUNT(DetailData1)]*.5)*(35.5));
end;
Any suggestions would be appreiciated. Thanks
Glen
Comments
and the use of [] is also invalid, and the aggregate is not available until the footer is handled.
one also must take great care when altering design heights of bands. you can actually widow a band's object(s) to the page,
if the bands height is set to less than the top property of the object, and after you alter it you should reset it in the oap event or in successive iterations of the band the changes can become cumulative.
What is it that you really want to accomplish? do you want the footer to print(output lower down?
tip: look at making use of the line or line# variable
Glen
this is your key
" I am attempting to format a cheque that has three parts"
re think your design
i assume you are using preprinted micr bank cheque forms.
you do not want to use bands you want to use one design page with text objects in set positions.
you want to control the data contents of those text objects.
to help you design scan a blank form and use it as the page background image,
you can also set it's visible and printable props.
you can now place the objects in the area(s) you need them.
you conect the tfrxreport component to a dataset to control the number of times to print.
you write code in the obp event of the various objects to control the text in each line of it's memo.
and iterate through a specific dataset that is available to the report(not the one used to control the report component).
Thanks for the suggestions, I will look at redoing the cheques the way you have suggested, thanks again
Glen