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

            rpt.Site = this.Site;
            return(rpt);
        }
예제 #2
0
        private void generate_stock_bill_Load(object sender, EventArgs e)
        {
            if (con.State == ConnectionState.Open)
            {
                con.Close();
            }

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

            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);



            CrystalReport6 myreport = new CrystalReport6();

            myreport.SetDataSource(ds);

            crystalReportViewer1.ReportSource = myreport;
        }