PEGetSelectedPrinter replacement using RDC

Converting application from API to RDC and can't find a replacement for PEGetSelectedPrinter. Product is finished, need help ASAP!

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

The Report object of the RDC has a SelectPrinter method:

Sub SelectPrinter (pDriverName As String, pPrinterName As String, _
pPortName As String)

I sometimes use it in correlation with the CRViewer's PrintButtonClicked event:

Private Sub Viewer_PrintButtonClicked(UseDefault As Boolean)

    UseDefault = False  'Don't use the default printer
    'CRPaperOrientation and CRPaperSize are Enumerated type _
        members of the CRAXDRT library
    Dim cOrientation As CRPaperOrientation
    Dim cSize As CRPaperSize
    'Get the report's current orientation and paper size
    cOrientation = crxRpt.PaperOrientation
    cSize = crxRpt.PaperSize
    crxRpt.PrinterSetup Me.hWnd     'Call the Printer Setup dialog

    'Loop through the Printers collection to ensure the correct _
        printer gets set for the report
    Dim p As Printer
    For Each p In Printers
        If p.DeviceName = crxRpt.PrinterName Then
            crxRpt.SelectPrinter p.DriverName, p.DeviceName, p.Port
            Exit For
        End If
    Next p

    'Reset the report's PaperOrientation and PaperSize properties _
        to override the "new" printer's defaults
    crxRpt.PaperOrientation = cOrientation
    crxRpt.PaperSize = cSize
    'Prompt the user for page numbers, copies, etc.
    crxRpt.PrintOut True, 1
    'To print directly to the printer, comment out the above line, _
        and uncomment the next line
    'crxRpt.PrintOut False, 1

End Sub


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.