Sanjeev Kumar

Sanjeev Kumar

  • NA
  • 309
  • 201.2k

Attaching Report to Crystal Report Viewer Control in vb.NET

Mar 16 2011 7:01 AM
i am using crystal report  in vs2010 and have followed all the steps to add crystal report. But unable to do the coding part to show the values in crystal report viewer but i am not able to attach the report in report viewer.
i am using the following code:-
Imports CrystalDecisions.CrystalReports.Engine

Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object,

    ByVal e As System.EventArgs) Handles Button1.Click

        Dim cryRpt As New ReportDocument

        cryRpt.Load("PUT CRYSTAL REPORT PATH HERE\CrystalReport1.rpt")

        CrystalReportViewer1.ReportSource = cryRpt

        CrystalReportViewer1.Refresh()

    End Sub

End Clas




Answers (1)