private void ReportData( string schname) { DataSet4TableAdapters.NotStartedRegTableAdapter ta = new DataSet4TableAdapters.NotStartedRegTableAdapter( ); DataSet4.NotStartedRegDataTable dt = new DataSet4.NotStartedRegDataTable( ); ta.Fill( dt, schname ); ReportDataSource rds = new ReportDataSource( ); rds.Name = "DataSet4"; rds.Value = dt; //Microsoft.Reporting.WinForms.ReportDataSource reportDataSource4 = new Microsoft.Reporting.WinForms.ReportDataSource( "DataSet4", dt.AsEnumerable( ).CopyToDataTable( ) ); ReportParameter rp = new ReportParameter( "schoolName", schname ); reportViewer1.LocalReport.DataSources.Clear( ); reportViewer1.LocalReport.ReportPath = "Report4.rdlc"; reportViewer1.LocalReport.SetParameters( new ReportParameter[] { rp } ); reportViewer1.LocalReport.DataSources.Add( rds ); reportViewer1.LocalReport.Refresh( ); }
ReportData(cboSchools.Text );
i was able to resolve this myself, i added reportViewer1.LocalReport.Refresh( ); after the calling method, and it works! Thanks
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)