Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#4.0
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;
}
Posted 14-Nov-12 0:09am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 7,373
1 OriginalGriff 5,571
2 Peter Leow 4,097
3 CHill60 2,858
4 Mika Wendelius 2,850


Advertise | Privacy | Mobile
Web01 | 2.8.150224.1 | Last Updated 14 Nov 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100