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!

CR9 Conflict between SELECTPRINTER and PRINTOUT? 2

Status
Not open for further replies.

dabineri

Programmer
Jun 20, 2001
265
0
0
US
I am trying (VB6 CR9.2) to set a particular printer for a report and then print without user intervention. It appears that I can use the REPORT.SELECTPRINTER when doing a manual printout and it works fine. I can use the REPORT.PRINTOUT method and accept the system default printer and print without user input BUT if I try to SELECTPRINTER and then PRINTOUT it gives an error indicating "error starting print job, check connection to printer".

What am I missing here, this should surely be possible.

Thanks for any help on this, David Abineri
 
I'm trying to do the same thing. Did you ever get a resolution to this problem?
 
I am doing it this way without bringing up the preview screen.

Dim crxApplication As New craxdrt.Application, report As New craxdrt.Report, DB As craxdrt.DatabaseTable
Set report = crxApplication.OpenReport(Report)
Set DB = reportt.Database.Tables(1)
DB.Location = PATH
reportt.DiscardSavedData
If Len(Trim(DeviceName)) > 0 Then
reportt.SelectPrinter DriverName, DeviceName, PrinterPort
End If
reportt.PaperOrientation = crDefaultPaperOrientation
reportt.PrintOut False, numprint

The FALSE in the line above supresses the printer dialog box.

Hope this helps.

David Abineri

 
Paper orientation ... just what I needed.

Thanks davida!! Star for you.

zemp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top