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.
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.