예제 #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            AllBalReportRange rpt = new AllBalReportRange();

            rpt.Site = this.Site;
            return(rpt);
        }
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {

                con.Open();

                SqlDataAdapter da = new SqlDataAdapter();
                da.SelectCommand = new SqlCommand("execute allItemBalanceRange @fdate,@tdate", con);
                da.SelectCommand.Parameters.AddWithValue("@fdate",textBox1.Text);
                da.SelectCommand.Parameters.AddWithValue("@tdate", textBox2.Text);
                DataTable dt = new DataTable();
                da.Fill(dt);
                AllBalReportRange myreport = new AllBalReportRange();

                myreport.SetDataSource(dt);
                allitemBalView albv = new allitemBalView();
                albv.crystalReportViewer1.ReportSource = myreport;
                albv.Show();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), "errorr!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            finally
            {
                con.Close();
            }
        }
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                con.Open();


                SqlDataAdapter da = new SqlDataAdapter();
                da.SelectCommand = new SqlCommand("execute allItemBalanceRange @fdate,@tdate", con);
                da.SelectCommand.Parameters.AddWithValue("@fdate", textBox1.Text);
                da.SelectCommand.Parameters.AddWithValue("@tdate", textBox2.Text);
                DataTable dt = new DataTable();
                da.Fill(dt);
                AllBalReportRange myreport = new AllBalReportRange();

                myreport.SetDataSource(dt);
                allitemBalView albv = new allitemBalView();
                albv.crystalReportViewer1.ReportSource = myreport;
                albv.Show();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), "errorr!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            finally
            {
                con.Close();
            }
        }
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
 {
     AllBalReportRange rpt = new AllBalReportRange();
     rpt.Site = this.Site;
     return rpt;
 }