예제 #1
0
        private void generate_seller_report_Load(object sender, EventArgs e)
        {
            if (con.State == ConnectionState.Open)
            {
                con.Close();
            }

            con.Open();
            DataSet4 ds = new DataSet4();

            SqlCommand cmd = con.CreateCommand();

            cmd.CommandType = CommandType.Text;
            cmd.CommandText = j;
            cmd.ExecuteNonQuery();
            DataTable      dt = new DataTable();
            SqlDataAdapter da = new SqlDataAdapter(cmd);

            da.Fill(ds.DataTable1);



            CrystalReport5 myreport = new CrystalReport5();

            myreport.SetDataSource(ds);

            crystalReportViewer1.ReportSource = myreport;
        }
예제 #2
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            CrystalReport5 rpt = new CrystalReport5();

            rpt.Site = this.Site;
            return(rpt);
        }