当我试图从VB中的另一个窗体在Crystal查看器中调用此报表时,一直遇到块错误。有人能帮忙吗?
Private Sub Command1_Click()
Dim crlApp As New CRAXDRT.Application
Dim crlRep As CRAXDRT.Report
Set crlRep = crlApp.OpenReport("E:FinessevbDevrptspeemptime.rpt")
Set Form1.CRViewer.ReportSource = cr1Rep
Form1.CRViewer.ViewReport
Form1.Show
End Sub
crlApp = New ReportDocument
crlApp.Load(Server.MapPath("E:FinessevbDevrptspeemptime.rpt"))
crlApp.SetDataSource (Your Data Source)
CRViewer.ReportSource = crlApp
crlApp.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, True, "ExportedReport")
OR
crlApp.ExportToHttpResponse(ExportFormatType.WordForWindows, Response, True, "ExportedReport")
OR
crlApp.ExportToHttpResponse(ExportFormatType.Excel, Response, True, "ExportedReport")