TppDrawText
In my nodata event I wish to print two lines of text. The following prints
both lines in preview but only the first when printing to the printer (MS
document writer).
procedure TFrAlarmActivity.RBpReportNoData(Sender, aDialog: TObject;
var aShowDialog: Boolean; aDrawCommand: TObject;
var aAddDrawCommand: Boolean);
var
lDrawText: TppDrawText;
begin
lDrawText:= TppDrawText(aDrawCommand);
lDrawText.WordWrap:= true;
lDrawText.WrappedText.Add('LineOne');
lDrawText.WrappedText.Add('LineTwo');
lDrawText.Left := 25000; //Measured in thousandths of millimeters
lDrawText.Width := RBReport.PrinterSetup.PageDef.mmPrintableWidth - 50000;
end;
both lines in preview but only the first when printing to the printer (MS
document writer).
procedure TFrAlarmActivity.RBpReportNoData(Sender, aDialog: TObject;
var aShowDialog: Boolean; aDrawCommand: TObject;
var aAddDrawCommand: Boolean);
var
lDrawText: TppDrawText;
begin
lDrawText:= TppDrawText(aDrawCommand);
lDrawText.WordWrap:= true;
lDrawText.WrappedText.Add('LineOne');
lDrawText.WrappedText.Add('LineTwo');
lDrawText.Left := 25000; //Measured in thousandths of millimeters
lDrawText.Width := RBReport.PrinterSetup.PageDef.mmPrintableWidth - 50000;
end;
This discussion has been closed.
Comments
Try setting the height of the TppDrawText object as well to give room for
the second line on the page.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com