1

Development Environment: Visual Studio 2012 Professional, RDLC, Windows Forms, SQL Server 2012, Entity Framework 5.0

I am working with RDLC in Windows Forms using Visual Studio 2012, I am facing issue of not populating my RDLC report in Windows forms. I am providing below my major steps to initiate with RDLC.

  • Step 1: I created DataSet for my Report.
  • Step 2: Then generated RDLC report
  • Step 3: Binding report with Reportviewer in windows forms.
  • Step 4: Showing nothing in report when running my app through Windows Forms.

Can anybody help me this one. It would be great if you provide me code to launch the RDLC report through code. I tried to attach snapshots of my application but can't it be possible.

Anjan Kant
  • 4,090
  • 41
  • 39
  • I have edited your title. Please see, "[Should questions include “tags” in their titles?](http://meta.stackexchange.com/questions/19190/)", where the consensus is "no, they should not". – John Saunders Mar 13 '15 at 07:38
  • Please keep those "Windows Forms, C#, RDLC" out of the title. They belong in the tags, only. – John Saunders Mar 14 '15 at 08:29
  • This can be anything. Impossible to tell without seeing code. – Gert Arnold Mar 14 '15 at 09:31
  • I need to populate RDLC report through code not dataset1.xsd , I search the procedure but not picked any clear procedure about it. I am using Entity framework 5.0 – Anjan Kant Mar 14 '15 at 11:13

1 Answers1

1

What you need is described in details here: https://msdn.microsoft.com/en-us/library/aa337089.aspx

Full example is given in "Viewing Reports in Local Processing Mode" section.

InitK
  • 1,261
  • 13
  • 21
  • Helped me link provided by you, finally I added few more lines in code to execute the RDLC report successfully DataTable dt = new DataTable(); dt = PopulateDt(dt); this.bindingSource1.DataSource = dt; ReportDataSource _rep = new ReportDataSource("vw_Student", this.bindingSource1); reportViewer1.LocalReport.DataSources.Clear(); reportViewer1.LocalReport.DataSources.Add(_rep); reportViewer1.RefreshReport(); – Anjan Kant Mar 19 '15 at 07:46