Thursday, 15 May 2014

How to supply data source instance for report viewer in code C# ASP.NET -


I am trying to load my ASP.NET Report Viewer by code, I get the following error Data source is not provided for example data source

Here my code is:

  Class_Connection.cnn.Close (); Class_Connection.cnn.Open (); Var CMD = New SQL Commands ("Select from TT", Class_ Connection.cnn); Var dt = new datatyll (); Dt.Load (cmd.ExecuteReader ()); Var Source = New ReportDataSource (dt.TableName, dt); RV_Main.LocalReport.DataSources.Clear (); RV_Main.LocalReport.ReportPath = Server.MapPath ("~ / Report / AllTTByLastWeek.rdlc"); RV_Main.LocalReport.DataSources.Add (source); RV_Main.LocalReport.Refresh ();  

How do I provide data source frequency not in code in GUI control? I had to set the data source in the property through GII in the IDE.


No comments:

Post a Comment