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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why NOT SelectPrinter THEN Printout

Status
Not open for further replies.

dabineri

Programmer
Jun 20, 2001
265
0
0
US
When I use the Report methods (VB6, CR9.2)

Report.SelectPrinter DriverName, DeviceName, PrinterPort

then

Report.PrintOut False, NumCopies

I get and error message: "Error starting print job. Please check your printer or network connection".

If I omit the PrintOut method I get the previewed report and can print from there fine so there is in fact no physical printer connection problem.

I am trying to have a report printed without user intervention once a printer has been pre selected.

Thanks for any help, this is driving me crazy!

David Abineri

 
Generally speaking, Crystal reports are created to use the user's default printer. So it is not necessary to specify a printer, in fact one should not hard code a specific printer into a Crystal report since that printer may not be available to the user.

I suppose you may want to have a special report (for internal use where the printer is known to exist) printed on a printer specifically designed for use with that report. (an extra large report might use a plotter for example) then you can hard code that printer into the report.

This doesn't answer your question as to why you cannot set the printer from VB...I am suggesting though it may not be necessary.

Jim Broadbent

The quality of the answer is directly proportional to the quality of the problem statement!
 
Jim, Thanks for your response. I am giving the user opportunity to select from the printers registered on his system in case he does not want to use the default system printer. I am not hard coding this choice but I give the user a chance to choose so that later he can print and know which printer the report will go to.

Any other suggestions would be welcome.

Thanks, David Abineri

 
I don't think you will have any...your choice is default printer or specified printer....but then you are going from VB and you seem to be able to designate the new printer.

Report.PrintOut False, NumCopies

Just curious...are you trying to automate the printing? What does "FALSE" do in the above.

Jim Broadbent

The quality of the answer is directly proportional to the quality of the problem statement!
 
Jim, The FALSE indicates no intervening dialog box will appear.

David Abineri

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top