Introduction In this code snippet , give idea to load crystal report in ASP.NET. Code Snippets-VB.NET //First import this namespace
Imports CrystalDecisions.CrystalReports.Engine
Dim ds as new Dataset
'Fill the dataset using Data adapter
'Here you have to write the code for populating dataset with DataAdapter.
Dim rep As New ReportDocument
rep.Load(Server.MapPath("CrystalReport1.rpt"))
rep.setDatasource(ds)
CrystalReportViewer1.ReportSource = rep Thank you |