I got a strange problem, when i try to print more then 1 copy, i load a templet from a file and then print it to the printer, but if i want 2 copi's then it shows on the sceen and does not come out on the printer
Where are you setting the number of copies? Remember that if you are loading templates, you will need to define any report properties after the template has been loaded (i.e. in the OnLoadEnd event of the template object).
For til := 1 to StrToInt(printstring) do begin if (til > 1) and (udskrivtyp='ord') then ppLabel5.Caption:=ppLabel5.Caption+'S KOPI '; if (til > 1) and (udskrivtyp='fak') then ppLabel5.Caption:=ppLabel5.Caption+' KOPI '; If StrToInt(printstring) =1 then ppReport1.DeviceType := 'Printer'; ppReport1.PrintReport; ppReport1.ShowPrintDialog:=False; If til = StrToInt(printstring) then kanluk:=True; end;
But I did not have this problem before, with olde versions of RB.
But i solved it, setting the devicetype proberty to Printer
Yes, it is not necessary to define the device type before calling Report.Print. Note that the Report.PrintReport is a deprecated routine that just makes a call to Report.Print and by default, the print routine generates to the screen.
Comments
Where are you setting the number of copies? Remember that if you are
loading templates, you will need to define any report properties after the
template has been loaded (i.e. in the OnLoadEnd event of the template
object).
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
printstring is a Tedit
For til := 1 to StrToInt(printstring) do
begin
if (til > 1) and (udskrivtyp='ord') then
ppLabel5.Caption:=ppLabel5.Caption+'S KOPI ';
if (til > 1) and (udskrivtyp='fak') then
ppLabel5.Caption:=ppLabel5.Caption+' KOPI ';
If StrToInt(printstring) =1 then
ppReport1.DeviceType := 'Printer';
ppReport1.PrintReport;
ppReport1.ShowPrintDialog:=False;
If til = StrToInt(printstring) then kanluk:=True;
end;
But I did not have this problem before, with olde versions of RB.
But i solved it, setting the devicetype proberty to Printer
Regards
Brian
Glad you got it figured out.
Yes, it is not necessary to define the device type before calling
Report.Print. Note that the Report.PrintReport is a deprecated routine that
just makes a call to Report.Print and by default, the print routine
generates to the screen.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com