protected void
Button2_Click(object sender, EventArgs e)
{
DataTable dtt = new
DataTable();
dtt.Columns.Add("Serial",typeof(string));
dtt.Columns.Add("Name", typeof(string));
dtt.Columns.Add("Dept", typeof(string));
dtt.Columns.Add("Salary", typeof(string));
dtt.Rows.Add("1","ShayamJi",".Net","20000");
dtt.Rows.Add("2", "Ashish Ji", "Sharepoint",
"30000");
dtt.Rows.Add("3", "Trupthi ji", "Java",
"21000");
ReportDataSource dsrpt = new
ReportDataSource("market",
dtt);
ReportViewer1.LocalReport.DataSources.Clear();
ReportViewer1.LocalReport.DataSources.Add(dsrpt);
ReportViewer1.LocalReport.ReportPath=(Server.MapPath("Report1.rdlc"));
ReportViewer1.LocalReport.Refresh();
//this.ReportViewer1.ReportRefresh();
//ReportViewer1.LocalReport.ReportEmbeddedResource
}
Steps:
No comments:
Post a Comment