Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delphi & Crystal 8.5 - Setting the Printer when using the API

Status
Not open for further replies.

richardy

IS-IT--Management
Oct 24, 2002
397
GB
Hi,

I'm trying to set the Printer in Crystal and using the following sequence:

PrintJob := PEOpenPrintJob(PChar(sReportPath));
PESelectPrinter(PrintJob, driverName, printerName, portName, ptrDevMode);
PEStartPrintJob(PrintJob, True);
PEOutputToWindow (printjob, PChar(ListBoxReports.ItemPart(ListBoxReports.ItemIndex, 0)), 50, 50, 500, 400, 0, 0);
PEStartPrintJob(printjob, true);

Now according to Crystal this should in theory set the printer - the drivername,printername,portname etc is set to the given printer (no problem with that bit), but when the report is displayed and I click print it still goes to the default printer....


Any ideas where I'm going wrong?

Regards,

Richard.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top