Crystal Reports Preview in VB
Hi,
I am using the following code to set the Data Source for a crystal report to a disconnected recordSet created in VB. This works perfectly when printing the report, but is there a way to get a preview window of the report? Thanks for any ideas.
VB Code:
Private Sub cmdReport_Click()
Dim CRXApplication As New CRAXDRT.Application
Dim CRXReport As CRAXDRT.Report
Set CRXReport = CRXApplication.OpenReport(App.Path & "\retention.rpt", 1)
Dim CRXDatabase As CRAXDRT.Database
Set CRXDatabase = CRXReport.Database
CRXDatabase.SetDataSource RS, 3, 1
CRXReport.PrintOut
End Sub