ShowPrintDialog
Hi,
Does ReportBuilder support showprintdialog when sending mulitple reports to
the printer as one print job? If so could you tell me how to include the
"showprintdialog" with the code I have provided below. Any help would be
appreciated.
============================================================================
====
procedure TForm1.buttonPrintClick(Sender: TObject);
var
lPrinterDevice : TppPrinterDevice;
integerX : integer;
begin
integerReportNo := 1;
lPrinterDevice := TppPrinterDevice.Create(self);
lPrinterDevice.PageSetting := psAll;
lPrinterDevice.StartPrintJob := True;
lPrinterDevice.EndPrintJob := False;
for integerX := 0 to tableReportTemplates.RecordCount - 1 do
begin
Report.Template.DatabaseSettings.Name := 'ReportPage' +
inttostr(integerReportNo) + 'Template';
Report.Template.LoadFromDatabase;
lPrinterDevice.Publisher := Report.Publisher;
Report.PrintToDevices;
inc(integerReportNo);
lPrinterDevice.StartPrintJob := False;
end;
lPrinterDevice.EndPrintJob := True;
lPrinterDevice.Free;
end;{buttonPrintClick}
============================================================================
====
TIA,
Jada Case
Does ReportBuilder support showprintdialog when sending mulitple reports to
the printer as one print job? If so could you tell me how to include the
"showprintdialog" with the code I have provided below. Any help would be
appreciated.
============================================================================
====
procedure TForm1.buttonPrintClick(Sender: TObject);
var
lPrinterDevice : TppPrinterDevice;
integerX : integer;
begin
integerReportNo := 1;
lPrinterDevice := TppPrinterDevice.Create(self);
lPrinterDevice.PageSetting := psAll;
lPrinterDevice.StartPrintJob := True;
lPrinterDevice.EndPrintJob := False;
for integerX := 0 to tableReportTemplates.RecordCount - 1 do
begin
Report.Template.DatabaseSettings.Name := 'ReportPage' +
inttostr(integerReportNo) + 'Template';
Report.Template.LoadFromDatabase;
lPrinterDevice.Publisher := Report.Publisher;
Report.PrintToDevices;
inc(integerReportNo);
lPrinterDevice.StartPrintJob := False;
end;
lPrinterDevice.EndPrintJob := True;
lPrinterDevice.Free;
end;{buttonPrintClick}
============================================================================
====
TIA,
Jada Case
This discussion has been closed.
Comments
print dialog once, and then all subsequent PrintToDevices calls will use the
printer setup from the first time you show the print dialog. Set
Report.ShowPrintDialog to true for the first report, and false for all
subsequent reports.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com