How to Align The summary to the bottom?
Hi guys,
Is there a way (Preferably an easy one) to align the summary to the bottom
of a page in RAP?
I've downloaded and looked at the following:
- http://www.digital-metaphors.com/tips/AlignSummaryToBottom.zip
(but the RAP Compiler was not happy with Report.Summary.PrintPosRect.Top,
Report.Engine.PageBottom, ...)
- http://www.digital-metaphors.com/tips/RAPDrawCommands.zip
(but the dpk's are for delphi 6 and i'm using 7)
Any Suggestions?
Olivier Peter
Is there a way (Preferably an easy one) to align the summary to the bottom
of a page in RAP?
I've downloaded and looked at the following:
- http://www.digital-metaphors.com/tips/AlignSummaryToBottom.zip
(but the RAP Compiler was not happy with Report.Summary.PrintPosRect.Top,
Report.Engine.PageBottom, ...)
- http://www.digital-metaphors.com/tips/RAPDrawCommands.zip
(but the dpk's are for delphi 6 and i'm using 7)
Any Suggestions?
Olivier Peter
This discussion has been closed.
Comments
requires clause for Delphi 7. Change the requires for rbRCL76 to rbRCL77 and
rbRAP76 to rbRAP77.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
I Tried some the following
Create the following Event for every component you want to move down:
procedure ComponentNameOnDrawCommandCreate(aDrawCommand: TObject);
begin
FDrawCommandList.Add(aDrawCommand);
end;
In the Afterprint event of the summary i do the following:
procedure SummaryAfterPrint;
liSummaryTop := PrintPosRectTop(Report);
liNewSummaryTop := PrintableHeightInMicrons(Report) -
BandHeightInMicrons(Report, Summary);
for liIndex := 0 to FDrawCommandList.Count - 1 do begin
lDrawCommand := TppDrawCommand(FDrawCommandList[liIndex]);
lDrawCommand.Top := (lDrawCommand.Top - liSummaryTop) + liNewSummaryTop;
end;
end;
In other words: move all the objects of the summary band down with a number
of pixels.
I found the this approach in
http://www.digital-metaphors.com/tips/AlignSummaryToBottom.zip
Am i forgetting something?
through functions (included in this demo amongst others):
http://www.digital-metaphors.com/tips/RAPAlignSummaryToBottom.zip
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
However,
When I open your project it says some things about some properties not
available
- ppReport1.ppOutlineSettings.Visible
- ppReport1.TextSearchSettings.DefaultString
- ppReport1.TextSearchSettings.Enabled
When i open the report and have a look at SummaryAfterPrint it gives me
Error on line 9: Undeclared Identitfier: 'BandPrintPosRectTop'
Should the example work with version 7.00 or do i have to install 7.02?
Olivier Peter
is a runtime example. If you only have RB Standard installed and don't have
the runtime designer component then you need to create and install a delphi
design time package to support the new RAP functions at design time. This is
easy, just include the two different RAP pass through function units from
the demo inside a new package. In this example, there are two RAP pass
through packages that can install into Delphi 6:
http://www.digital-metaphors.com/tips/RAPDrawCommands.zip
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com