How to view the report
Using VB开发者_开发问答6 & Crystal Report 9. Need help with the VB6 code.
When i click the button, i want to view the report in the form. Any ideas on how to view the report?
There is Crystal Report Viewer Control. Right click toolbox window and select Components... Then scroll down and select Crystal Report Viewer Control. Place it on a form and create a method to set path to report file, report parameters etc.
Private Sub mShowReport()
'...set report file...
CRViewer1.ReportSource = "C:\Reports\MyReport.rpt"
'...populate report params...
'*** insert code here ***
'...show it...
CRViewer1.ViewReport
End Sub
精彩评论