how can i print directly to the printer
Hello,
i need help about the delphicode for direct printing a report to the printer.
the code "frReport1.showprint" takes the Output first on the Screen.
Hoe can i direct printing to the outputdevice Printer?
Many Thanks for your answer
Best Regard Carsten
i need help about the delphicode for direct printing a report to the printer.
the code "frReport1.showprint" takes the Output first on the Screen.
Hoe can i direct printing to the outputdevice Printer?
Many Thanks for your answer
Best Regard Carsten
Comments
instead of calling showreport,
call preparereport then call printpreparedreportdlg for print dialog or
printpreparedreport('',1,true,frall)
param1 str '1,3' or '5..9' or '' for all
param2 int number of copies
param3 boolean collate
param4 fr constant.
regards
best regards
C.Wille
I need to print on two different printers on same PC without prompting user to select printer. How I can, from code, select printer where to print???
Sorry for my bad english:(
Best regards,
nele
(of course it is not in FastReport but in Delphi - you can do it in BC++ too)
if your FreeReport object name is frReport1
frReport1.ChangePrinter(aOldIndex, aNewIndex,);
frReport1.PrintPreparedReport('',PrintDialog1.Copies, PrintDialog1.Collate, frAll);
where method ChangePrinter has two parameters
1st - index of old printer
2nd - new index
PrintPreparedReport that method print report without dialog with user; if you use that method you have to give 4 parameters (PageNumbers: string; Copies: Integer; Collate: Boolean; PrintPages: TfrPrintPages)
if you want to find out how much indexes of printers are availible you can use object of TPtinter (you have to add Printers to section "uses")
than object of TPrinter for example Printer has method Printers
so from 0 to printer.Printers.Count-1 it's range of indexes' availible in your computer
if something is not clear you can write me guzial@wp.pl
regards sorry for my english