Display Rdlc report in the web page in Asp.Net Mvc4 -


I am very new to ASP.Net MVC4. I have a rdlc report and I must add that report to my index page. But I have done a lot, they have suggested that like PDF file or image file. I need to display the report on the page

> This is a 1 year old post, but many people still have this page So I thought to answer this question.

-> Did you consider displaying the RDLC report on your webpage using the report weaver?

1) Create ASPX pages. Add "ScriptManager" to this page from the "AjaxExtension" tool option 2) Add "Report Weaver" to this page from the "Reports" tool option. 3) And consider the following code to assign data source to the codebehind of this aspx page.

  string ID = request. JQueryString ["ID"]; & Lt; Obj1 & gt; List 1 = New list & lt; Obj1 & gt; (); & Lt; Obj2 & gt; List2 = New list & lt; Obj2 & gt; (); & Lt; Obj3 & gt; List3 = New list & lt; Obj3 & gt; (); {List1 = db.'tTableName1'.Where (x => x.id == ID) using (Var db = new 'use ur edmx connectionstring name'). ToList (); List2 = db.'tTableName2'.Where (y = & gt; y.id == ID) .Oolist (); List3 = db.'tTableName3'.Where (z = & gt; z.id == ID) .Ollist (); } RptVWSmartBOM.LocalReport.DataSources.Clear (); ReportDataSource rd1 = New ReportDataSource ("Your DataTable Name Used in DataTet", list1); ReportDataSource rd2 = New ReportDataSource ("DataTet used your datatable name", list 1); ReportDataSource rd3 = New ReportDataSource ("Your DataTable Name Used in DataTet", list1); ReportViewer1.LocalReport.DataSources.Add (RD1); ReportViewer1.LocalReport.DataSources.Add (RD2); ReportViewer1.LocalReport.DataSources.Add (Rd3); ReportViewer1.LocalReport.ReportPath = "xyz.rdlc"; ReportViewer1.LocalReport.Refresh ();  

Comments