private void Report_Load(object sender, EventArgs e) { reportViewer1.ProcessingMode=ProcessingMode.Local; LocalReport lr = reportViewer1.LocalReport; lr.ReportPath = AppDomain.CurrentDomain.BaseDirectory+"..\\..\\Reports\\rptSaleHotel.rdlc"; SqlDataAdapter adp = new SqlDataAdapter("HotelSale", ConfigurationManager.ConnectionStrings["cn"].ConnectionString); adp.SelectCommand.CommandType = CommandType.StoredProcedure; adp.SelectCommand.Parameters.Add("@from",SqlDbType.DateTime).Value="02-02-2011"; adp.SelectCommand.Parameters.Add("@to", SqlDbType.DateTime).Value = "02-17-2011"; DataSet ds = new DataSet(); adp.Fill(ds); ReportDataSource rds = new ReportDataSource(); this.reportViewer1.LocalReport.DataSources.Clear(); rds.Value = ds.Tables[0]; rds.Name = "salehotel"; string st=lr.ReportPath.ToString(); lr.DataSources.Add(rds); }
A datasource instance has not been supplied for the datasource 'dbTraDeskDatase_HotelSale'.
rds.Name = "salehotel";
rds.Name = "dbTraDeskDataSet_HotelSale";
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)