I have worked on RDLC reports in this i have created Report1.rdlc and Form1 (Windows form ). this code is not working
private void Form1_Load(object sender, EventArgs e)
{
DataTable dtGet = GetTable();
reportViewer1.LocalReport.DataSources
.Add(new ReportDataSource("Report1", dtGet));
this.reportViewer1.RefreshReport();
}
public DataTable GetTable()
{
DataTable table = new DataTable();
table.Columns.Add("Dosage", typeof(int));
table.Columns.Add("Drug", typeof(string));
table.Rows.Add(25, "Indocin");
table.Rows.Add(50, "Enebrel");
table.Rows.Add(10, "Hydralazine");
table.Rows.Add(21, "Combivent");
table.Rows.Add(100, "Dilantin");
return table;
}