.rdlc Report in ASP.Net

Note: Add a ScriptManager on the .aspx where the ReportViewer is placed.

using Microsoft.Reporting.WebForms;
try
{
dsTest ds = new dsTest();
DataTable dt = ds.Tables[0];

DataRow dr = dt.NewRow();
dr[0] = “1”; dr[1] = “A”;
dt.Rows.Add(dr);

ReportViewer1.Reset();

ReportViewer1.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Local;

ReportDataSource rds = new ReportDataSource(“testReport”, dt);
ReportViewer1.LocalReport.DataSources.Add(rds);

ReportViewer1.LocalReport.ReportEmbeddedResource = “RdlcTestForDelete.testReport.rdlc”;

ReportViewer1.LocalReport.Refresh();
}
catch (Exception Ex)
{
throw Ex;
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s