0
在VB中從其他表單調用Crystal查看器中的此報表時,出現塊錯誤。任何人都可以協助嘗試在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
你可以發佈什麼確切的錯誤你得到? – HaveNoDisplayName
你真的可以使用'Set'嗎?在可能的情況下總是將聲明和初始化結合起來:Dim crlRep As CRAXDRT.Report = crlApp.OpenReport(「E:\ Finesse \ vbDev \ rpts \ peemptime.rpt」)' –