Friday, January 22, 2010

How to use Crystal Report into the ASP.NET

using CrystalDecisions.CrystalReports.Engine;
protected void Page_Load(object sender, EventArgs e)
{
ConfigureReport();
}
private void ConfigureReport()
{
ReportDocument mydoc = new ReportDocument();
string reportPath = Server.MapPath("Report.rpt");
mydoc.Load(reportPath);
CrystalReportViewer1.ReportSource = mydoc;
CrystalReportViewer1.DataBind();
}

No comments: