Hi ,
I am a beginner with Crystal Reports (8). I have built a CR.
In this VB app, I want the user to be able to open/view the report, but have it automatically refresh from the datasource beforehand.
This works.. but has 2 problems :
1) The .Refresh gives an error and
2) the .PrintReport does not print - no error
You have to click the Refresh icon to force the report to refresh from current data - then it does.
Also you have to click the Printer icon to print the report.
Thanks for any suggestions, John
Dim CRapp As New Application
Dim CRrpt As Report
Private Sub cmdViewReport_Click()
Set CRrpt=CRapp.OpenReport"C:\MyCrystalReports\AreaCodes.rpt"
CRViewer1.ReportSource = CRrpt
CRViewer1.Refresh get error "Method 'Refresh' of object... failed"
CRViewer1.ViewReport
CRViewer1.PrintReport 'no error just doesnt print
End Sub
I am a beginner with Crystal Reports (8). I have built a CR.
In this VB app, I want the user to be able to open/view the report, but have it automatically refresh from the datasource beforehand.
This works.. but has 2 problems :
1) The .Refresh gives an error and
2) the .PrintReport does not print - no error
You have to click the Refresh icon to force the report to refresh from current data - then it does.
Also you have to click the Printer icon to print the report.
Thanks for any suggestions, John
Dim CRapp As New Application
Dim CRrpt As Report
Private Sub cmdViewReport_Click()
Set CRrpt=CRapp.OpenReport"C:\MyCrystalReports\AreaCodes.rpt"
CRViewer1.ReportSource = CRrpt
CRViewer1.Refresh get error "Method 'Refresh' of object... failed"
CRViewer1.ViewReport
CRViewer1.PrintReport 'no error just doesnt print
End Sub