Here is the code that was suggested. I am using the viewer code from 8.5 and vb6 but it errors on the printersetup method.
My viewer control is crviewer1, I do not get the method printersetup when I use the "."
TSD
Private Sub CRViewer_PrintButtonClicked(UseDefault As Boolean)
UseDefault = False
'Invoke the Printer Setup dialog
crxRpt.PrinterSetup Me.hWnd
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
The above code is for use with the RDC (Report Designer Component), which requires:
1) Your VB Project has a reference to the Crystal Reports 8.5 ActiveX Designer Run Time Library (craxdrt.dll)
2) The app uses a Crystal Viewer Control (crviewer.dll) to display the report.
If you're using some other method to call and view your reports (OCX, API, CRPEAuto, etc.), please state that in your next post. The above code won't work with any of those methods.
So, if you are indeed using the RDC, it could be that you need a hotfix/service pack: Hot Fixes Service Packs
Also, please provide the code you're using the open/view the report.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.