How can I create a VB6 project to view my Crystal Reports c: est.rpt?
1. Open a new VB6 project 2. Add a new form 3. Click Project on the toolbar and select References 4. Check the reference boxes for Crystal Reports Viewer 8/8.5/9/10/11/11.5 Control and Crystal Reports 8/8.5/9/10/11/11.5 ActiveX Designer Run Time Library 5. Add CRViewer control onto your form 6. Add the following code Dim crxApplication As New CRAXDRT.Application Dim crxReport As New CRAXDRT.Report Private Sub Form_Load() Dim rptfilename As String, formula As String, stext As String rptfilename = “c:\test.rpt” formula = “” stext = “” Call rptviewer(rptfilename, formula, stext) End Sub Sub rptviewer(rptfilename As String, formula As String, stext As String) On Error GoTo crerror If (rptfilename <> “”) Then rptnamex.Caption = rptfilename Set crxReport = crxApplication.OpenReport(rptfilename) CRViewer1.ReportSource = crxReport If (formula <> “”) Then CRViewer1.SearchByFormula (formula) If (stext <> “”) Then CRViewer1.SearchForText (stext) CRViewer1.ViewReport Set crxReport = Nothing Set cr