尝试从VB中的另一个表单在Crystal查看器中调用此报表时,我一直遇到阻塞错误。有人可以帮忙吗?
Private Sub Command1_Click()
Dim crlApp As New CRAXDRT.Application
Dim crlRep As CRAXDRT.Report
Set crlRep = crlApp.OpenReport("E:\Finesse\vbDev\rpts\peemptime.rpt")
Set Form1.CRViewer.ReportSource = cr1Rep
Form1.CRViewer.ViewReport
Form1.Show
End Sub
答案 0 :(得分:0)
crlApp = New ReportDocument
crlApp.Load(Server.MapPath("E:\Finesse\vbDev\rpts\peemptime.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")