Example #1
0
        private void Stock_Report_Load(object sender, EventArgs e)
        {
            //createData();
            //this.StockReportViewr.RefreshReport();

            StockDS ds            = new StockDS();
            string  strConnString = @"Data Source=SURESH\SQLEXPRESS;Initial Catalog=FutureSoft;Integrated Security=True";

            SqlConnection conn = new SqlConnection(strConnString);

            conn.Open();
            string sql = "Select * FROM _Category";

            SqlDataAdapter ad = new SqlDataAdapter(sql, conn);

            // DataSet ds = new DataSet();
            ad.Fill(ds, ds.Tables[0].TableName);


            ReportDataSource rds = new ReportDataSource("_Category", ds.Tables[0]);

            this.reportViewer1.LocalReport.DataSources.Clear();
            this.reportViewer1.LocalReport.DataSources.Add(rds);
            this.reportViewer1.LocalReport.Refresh();

            this.reportViewer1.Refresh();

            this.reportViewer1.RefreshReport();
        }
Example #2
0
 void fillData()
 {
     StockDS sd = new StockDS();
 }