예제 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                con.Open();


                SqlDataAdapter da = new SqlDataAdapter();
                da.SelectCommand = new SqlCommand("execute allProfit", con);

                DataTable dt = new DataTable();
                da.Fill(dt);

                allProfit myreport = new allProfit();
                myreport.SetDataSource(dt);
                profitView pv = new profitView();
                pv.crystalReportViewer1.ReportSource = myreport;
                pv.Show();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), "errorr!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            finally
            {
                con.Close();
            }
        }
예제 #2
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            allProfit rpt = new allProfit();

            rpt.Site = this.Site;
            return(rpt);
        }
예제 #3
0
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
 {
     allProfit rpt = new allProfit();
     rpt.Site = this.Site;
     return rpt;
 }