StormbringerX
Programmer
Hi gang,
I'm somewhat new to Crystal Reports but I couldn't find any relevant FAQ's so excuse me if I'm re-asking the obvious.
I have a VB6 application using CR Version8. I'm using the crviewer to enable printing of a report whose data originates from SQLServer 2000. The report runs well and I have no problem. However, my company has designed a printer class that enables us to direct a particular workstation's output to a specific, pre-defined printer.
According to what I can find in the CR documentation, I should be able to set the CRReport.PrinterName, CRReport.PrinterDriver, and the CRReport.PrinterPort to define the printer I want the report to print to.
However, I keep receiving the error: Wrong number of arguments or invalid property assignment.
Here is the syntax I'm using:
crReport.PrinterName = objPrinterUsed.PrinterName
crReport.PortName = objPrinterUsed.Port
crReport.DriverName = objPrinterUsed.DriverName
These Statements are in the Form_Load of the CRForm (that contains the preview and the print button, etc...). I can remark any 2 of the 3 lines and it will hit the same error on the unremarked line. The objPrinterUsed object has the correct information for the printer that I'm wanting to use. And I can use the crReport.PrinterSetup and choose the same printer and print to it with no problem.
All other pieces of the app use this defined printer object with no problem, but I can't seem to figure out what crystal reports needs that I'm not giving.
Thanks.
Dave
I'm somewhat new to Crystal Reports but I couldn't find any relevant FAQ's so excuse me if I'm re-asking the obvious.
I have a VB6 application using CR Version8. I'm using the crviewer to enable printing of a report whose data originates from SQLServer 2000. The report runs well and I have no problem. However, my company has designed a printer class that enables us to direct a particular workstation's output to a specific, pre-defined printer.
According to what I can find in the CR documentation, I should be able to set the CRReport.PrinterName, CRReport.PrinterDriver, and the CRReport.PrinterPort to define the printer I want the report to print to.
However, I keep receiving the error: Wrong number of arguments or invalid property assignment.
Here is the syntax I'm using:
crReport.PrinterName = objPrinterUsed.PrinterName
crReport.PortName = objPrinterUsed.Port
crReport.DriverName = objPrinterUsed.DriverName
These Statements are in the Form_Load of the CRForm (that contains the preview and the print button, etc...). I can remark any 2 of the 3 lines and it will hit the same error on the unremarked line. The objPrinterUsed object has the correct information for the printer that I'm wanting to use. And I can use the crReport.PrinterSetup and choose the same printer and print to it with no problem.
All other pieces of the app use this defined printer object with no problem, but I can't seem to figure out what crystal reports needs that I'm not giving.
Thanks.
Dave