problems band height
Hi,
I have a spreadsheet style report (two pages side by side are in fact one
page). Problems are with determining band height. Print height of the band
is dynamic and hight of the band vary with amount od data in TppDBMemos. All
memos are dynamicly created. After the band is generated its Height property
remains 0, although it is printed correctly. I need this info to correctly
set other page benad height for corresponding row from first page.
So, can anybody tell me how to correctly get band height after it is
generated?
Tfanx, Robert...
I have a spreadsheet style report (two pages side by side are in fact one
page). Problems are with determining band height. Print height of the band
is dynamic and hight of the band vary with amount od data in TppDBMemos. All
memos are dynamicly created. After the band is generated its Height property
remains 0, although it is printed correctly. I need this info to correctly
set other page benad height for corresponding row from first page.
So, can anybody tell me how to correctly get band height after it is
generated?
Tfanx, Robert...
This discussion has been closed.
Comments
that you want. Use this subreport as the guide for hte other subreport.
You'll need to create a list of heights for each detail band that prints in
the controller subreport. Place these values in a list. Then when the
second subreport prints, you'll be able to set the detailband's static
height before each one prints in the second subreport.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
height
in
That was the approach I was going to take. Problem is then I can't get
proper band height. I try to do that in AfterGenerate event, but I always
get that Height is 0.
Please people, it is very urgent for me.
How to corectly determine height of detail band after generate
(PrintHeight if the band is phDynamic, and band is on the subreport)?
Band.Height in AfterGenerate allways returns 0.
Should I look for band height in some other place or in some other way?
Thanx, Robert...
values in microns on the page that the band just generated for. You will
need to use the DetailBand.AfterPrint event to get the height:
uses
ppUtils, ppTypes;
procedure TForm1.ppDetailBand1BeforeGenerate(Sender: TObject);
begin
FTop := ppReport1.Engine.PrintPosRect.Top;
FTop := ppFromMMThousandths(Round(FTop), ppReport1.Units, pprtVertical,
ppReport1.Printer);
end;
procedure TForm1.ppDetailBand1AfterPrint(Sender: TObject);
var
ldHeight: Double;
begin
FBottom := ppReport1.Engine.PrintPosRect.Bottom;
FBottom := ppFromMMThousandths(Round(FBottom), ppReport1.Units,
pprtVertical, ppReport1.Printer);
ldHeight := FBottom - FTop;
...
end;
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com