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

            rpt.Site = this.Site;
            return(rpt);
        }
예제 #2
0
        private void button6_Click_1(object sender, EventArgs e)
        {
            _report     a    = new _report();
            reportQuery st   = new reportQuery();
            string      iQry = string.Format(st.graphAll, this.dateTimePicker1.Text);
            dataset     ds   = new dataset();

            using (MySqlConnection conn = new MySqlConnection(DBConn.connstring))
            {
                conn.Open();
                MySqlCommand     cmd     = new MySqlCommand(iQry, conn);
                MySqlDataAdapter adapter = new MySqlDataAdapter();
                adapter.SelectCommand = cmd;
                adapter.Fill(ds, ds.Tables["graph"].TableName);
                _cr_GraphStat rep = new _cr_GraphStat();
                rep.SetDataSource(ds);
                a.crystalReportViewer1.ReportSource = rep;
                a.ShowDialog();
            }
        }