I want to print a report to all but one of the workstations printers
The code I have used is :
For Each Y In Printers
If UCase(Y.DeviceName) <> UCase("LaserJet 2200 DN" Then
set printer = Y
Set CrxReport = crxApplication.OpenReport (App.Path "\Preport.Rpt"
CrxReport.DiscardSavedData
CrxReport.ParameterFields.GetItemByName("Pdate".AddCurrentValue Yesterday
CrxReport.PrintOut False, 1
End If
Next
the problem this only prints to the default printer each time.
I have tried just printing text to the printers in the following code and it works fine. Why??? does the crystal alter the behaviour?
For Each x In Printers
Debug.Print x.DeviceName
Set Printer = x
Printer.Print "this is text"
Printer.EndDoc
Next
The code I have used is :
For Each Y In Printers
If UCase(Y.DeviceName) <> UCase("LaserJet 2200 DN" Then
set printer = Y
Set CrxReport = crxApplication.OpenReport (App.Path "\Preport.Rpt"
CrxReport.DiscardSavedData
CrxReport.ParameterFields.GetItemByName("Pdate".AddCurrentValue Yesterday
CrxReport.PrintOut False, 1
End If
Next
the problem this only prints to the default printer each time.
I have tried just printing text to the printers in the following code and it works fine. Why??? does the crystal alter the behaviour?
For Each x In Printers
Debug.Print x.DeviceName
Set Printer = x
Printer.Print "this is text"
Printer.EndDoc
Next