我在一些文档中创建了一个用于打印的.net Web应用程序。
现在我想在按下'按钮1'的同时调用这个水晶报告 我面临一些困难
受保护的子按钮1_Click(ByVal sender As Object,ByVal e As EventArgs)处理按钮1.单击
Dim cryRpt As New CR_Agreement
cryRpt.Load("@C:\Users\emarketing\Documents\Visual Studio 2010\Projects\ARC\ARC\CRReports\CR_Agreement.rpt")
CrystalReportViewer1.ReportSource = cryRpt
End Sub
答案 0 :(得分:0)
设置报告源后尝试刷新查看器。
Protected Sub button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles button1.Click
Dim cryRpt As New CR_Agreement
cryRpt.Load("@C:\Users\emarketing\Documents\Visual Studio 2010\Projects\ARC\ARC\CRReports\CR_Agreement.rpt")
CrystalReportViewer1.ReportSource = cryRpt
CrystalReportViewer1.Refresh()
End Sub