If the MessageOnPage option has been selected, then the draw text command which will be added to the output page is passed via the aDrawCommand parameter (otherwise this parameter is nil.) You can prevent the draw command from being added to the output page by setting aAddDrawCommand to False. Doing so causes the draw command to be freed by the engine. In order to get access to the draw command properties, add ppDrwCmd to the uses clause, and typecast this parameter as TppDrawText. You can then set the value and position of the text, as in:
Comments
From the RBuilder.hlp file:
If the MessageOnPage option has been selected, then the draw text command
which will be added to the output page is passed via the aDrawCommand
parameter (otherwise this parameter is nil.) You can prevent the draw
command from being added to the output page by setting aAddDrawCommand to
False. Doing so causes the draw command to be freed by the engine. In order
to get access to the draw command properties, add ppDrwCmd to the uses
clause, and typecast this parameter as TppDrawText. You can then set the
value and position of the text, as in:
lDrawText := TppDrawText(aDrawCommand);
lDrawText.TextAlignment := taCentered; lDrawText.Text := 'No orders for ' +
Table1.FieldByName('Company').AsString; lDrawText.Left := 0; lDrawText.Width
:= ppReport1.PrinterSetup.PageDef.mmPrintableWidth;
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com