Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact
A1VBCode Forums
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      

Home » .NET Programming » Visual Basic .NET » How to show DataTable in ReportViewer contral...


How to show DataTable in ReportViewer contral...Expand / Collapse
Author
Message
Posted 7/3/2009 5:00:03 AM


Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 7/3/2009 5:00:21 AM
Posts: 1, Visits: 19

Hello Gurus,

I have the a DataTable and I want to show it in Report, For this I do this...

1. Create a DataTable "tbl" and add data into it.
2. Create a DataSet1 (DataSet1.xsd) having table ("tblEmp") with same defination as in my DataTable "tbl"
3. In a Form Draw ReportViewer1 control and a button(Button1) and create following code in
   Button1_click event

        Me.ReportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Local
        Me.ReportViewer1.LocalReport.ReportPath = "C:\Report1.rdlc"
        Me.ReportViewer1.LocalReport.DataSources.Add(New Microsoft.Reporting.WinForms.ReportDataSource("tblEmp", tbl))
        Me.ReportViewer1.RefreshReport()


The report show only report columns without any data. [My tbl has 3 rows]


Please tell me where I am wrong ?

Thanks

Post #27871
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 1 (1 guest, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Admin, Mod

PermissionsExpand / Collapse

All times are GMT -5:00, Time now is 6:55pm