Limit memo stretching at the end of the last page - again.
I have used your example
http://www.digital-metaphors.com/tips/SummaryMemoOverflows.zip
to limit memo stretching at the end of the last page but when the report is
very complex
the memo is printed over a new page at the end of the report also if in the
previous page there is available space to print it.
I have debugged the function and i have noticed that the parameter
Report.Engine.PrintPosRect.Top don't change the value when some regions or
subreports are activated in the header band (using HeaderBeforeGenerate
event)
There is a solution to this behaviour ?
Thanks in advance.
Massimo.
http://www.digital-metaphors.com/tips/SummaryMemoOverflows.zip
to limit memo stretching at the end of the last page but when the report is
very complex
the memo is printed over a new page at the end of the report also if in the
previous page there is available space to print it.
I have debugged the function and i have noticed that the parameter
Report.Engine.PrintPosRect.Top don't change the value when some regions or
subreports are activated in the header band (using HeaderBeforeGenerate
event)
There is a solution to this behaviour ?
Thanks in advance.
Massimo.
This discussion has been closed.
Comments
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
and in the onprint event of the tppmemo component but the problem persist.
Please note that when some regions or subreports in the header band are not
visible, the memo is correctly printed.
Thanks for your answer.
"Jim Bennett (Digital Metaphors)" wrote
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
any strange behavior. I added memos, regions and subreport in the header
band. I set them to be visible in the HeaderBand.BeforeGenerate event.
Can you modify the SummaryMemoOverflow demo and send this example to
support@digital-metaphors.com ?
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
dynamically and all you have to do is use the following two lines of code.
This will fool the engine to do what you want:
procedure TForm1.ppSummaryBand1AfterGenerate(Sender: TObject);
begin
ppSummaryBand1.OutOfSpace := False;
ppSummaryBand1.OverFlow := False;
end;
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
printed over two or more pages, it will be truncated in one page.
You can see this behaviour in my example when all regions and subreports are
activated.
Thanks.
Massimo.
"Jim Bennett (Digital Metaphors) wrote :
band
persist.
the memo should do?
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
the report a number of lines to fill the last page from the first blank row
to the end of the page.
I thought that the solution was to use a memo component as the last
component of the summary in witch i have manually inserted 90 lines and then
in the before print event of the summary band, stretch the memo to print
only the rows of the memo that fit into the last page (without print a new
page only with the residual lines).
Please note that in the summary band, before the memo component are inserted
regions and/or subreports components.
Thank you for your attention.
Massimo
"Jim Bennett (Digital Metaphors)" wrote
about to be printed in the summary band.
procedure TForm1.ppMemo1Print(Sender: TObject);
begin
FMemoPrinted := True;
end;
procedure TForm1.ppSummaryBand1BeforeGenerate(Sender: TObject);
begin
FMemoPrinted := False;
end;
procedure TForm1.ppSummaryBand1AfterPrint(Sender: TObject);
begin
if FMemoPrinted then
begin
ppReport1.SummaryBand.OutOfSpace := False;
ppReport1.SummaryBand.OverFlow := False;
end;
end;
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com