Problem with copies settings.
Hi,
all my reports are dynamically loaded inside ppReport in runtime. The
ppReport component is assigned to the ppViewer component on the form. To the
button on click event is assigned following code:
with ppReport do
begin
DeviceType := 'Printer';
Print;
end; // with
Properties of ppReport are:
***********************
object ppReport: TppReport
PrinterSetup.BinName = 'Default'
PrinterSetup.DocumentName = 'Report'
PrinterSetup.PaperName = 'A4 210 x 297 mm'
PrinterSetup.PrinterName = 'Default'
PrinterSetup.mmMarginBottom = 6350
PrinterSetup.mmMarginLeft = 6350
PrinterSetup.mmMarginRight = 6350
PrinterSetup.mmMarginTop = 6350
PrinterSetup.mmPaperHeight = 297000
PrinterSetup.mmPaperWidth = 210000
PrinterSetup.PaperSize = 9
Units = utMillimeters
AllowPrintToArchive = True
AllowPrintToFile = True
DeviceType = 'Printer'
Language = lgCustom
OutlineSettings.CreateNode = True
OutlineSettings.CreatePageNodes = True
OutlineSettings.Enabled = True
OutlineSettings.Visible = True
PreviewFormSettings.WindowState = wsMaximized
SavePrinterSetup = True
TextSearchSettings.DefaultString = ''
TextSearchSettings.Enabled = False
Left = 436
Top = 196
Version = '7.02'
mmColumnWidth = 0
object ppDetailBand1: TppDetailBand
mmBottomOffset = 0
mmHeight = 13229
mmPrintPosition = 0
end
object ppParameterList1: TppParameterList
end
end
If I click on the print button the PrinterSetup dialog appears. If I select
any number of copies (2 or more) the report builder always print only one
copy of the report. Is there any settings which I can change to allow
printing of 2 and more copies of the report?
The code for loading report from template is:
begin
...
lField := dmPrintReports.memtblOriginalReportsData;
if Assigned(lField) then
if lField.IsBlob then
begin
TBlobField(lField).SaveToStream(lStream);
lStream.Position := 0;
ppReport.Template.LoadFromStream(lStream);
end;
..
end;
I am using Delphi 7 & RB 7.02.
Tried with two printers HP DeskJet 970CXi and Epson C80.
Thanks for your help
Petr Slipek
all my reports are dynamically loaded inside ppReport in runtime. The
ppReport component is assigned to the ppViewer component on the form. To the
button on click event is assigned following code:
with ppReport do
begin
DeviceType := 'Printer';
Print;
end; // with
Properties of ppReport are:
***********************
object ppReport: TppReport
PrinterSetup.BinName = 'Default'
PrinterSetup.DocumentName = 'Report'
PrinterSetup.PaperName = 'A4 210 x 297 mm'
PrinterSetup.PrinterName = 'Default'
PrinterSetup.mmMarginBottom = 6350
PrinterSetup.mmMarginLeft = 6350
PrinterSetup.mmMarginRight = 6350
PrinterSetup.mmMarginTop = 6350
PrinterSetup.mmPaperHeight = 297000
PrinterSetup.mmPaperWidth = 210000
PrinterSetup.PaperSize = 9
Units = utMillimeters
AllowPrintToArchive = True
AllowPrintToFile = True
DeviceType = 'Printer'
Language = lgCustom
OutlineSettings.CreateNode = True
OutlineSettings.CreatePageNodes = True
OutlineSettings.Enabled = True
OutlineSettings.Visible = True
PreviewFormSettings.WindowState = wsMaximized
SavePrinterSetup = True
TextSearchSettings.DefaultString = ''
TextSearchSettings.Enabled = False
Left = 436
Top = 196
Version = '7.02'
mmColumnWidth = 0
object ppDetailBand1: TppDetailBand
mmBottomOffset = 0
mmHeight = 13229
mmPrintPosition = 0
end
object ppParameterList1: TppParameterList
end
end
If I click on the print button the PrinterSetup dialog appears. If I select
any number of copies (2 or more) the report builder always print only one
copy of the report. Is there any settings which I can change to allow
printing of 2 and more copies of the report?
The code for loading report from template is:
begin
...
lField := dmPrintReports.memtblOriginalReportsData;
if Assigned(lField) then
if lField.IsBlob then
begin
TBlobField(lField).SaveToStream(lStream);
lStream.Position := 0;
ppReport.Template.LoadFromStream(lStream);
end;
..
end;
I am using Delphi 7 & RB 7.02.
Tried with two printers HP DeskJet 970CXi and Epson C80.
Thanks for your help
Petr Slipek
This discussion has been closed.
Comments
template, it will overwrite the changes you've previously made to the
Report.PrinterSetup as the PrinterSetup is a persistent object stored in the
report template. We have a 970cxi here to test with. If you still can't get
it working, then send a simepl example that shows the problem and we'll run
it here on our printers. Send attachements to support@digital-metaphors.com
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com