Reputation: 37
I created a .net web application for printing in some document.
Now I want to call this crystal report while pressing the 'Button 1' i am facing some difficulty to do this
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
End Sub
Upvotes: 0
Views: 43
Reputation: 942
Try refreshing the viewer after you set the report source.
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
Upvotes: 0