Пример #1
0
        private void crystalReportViewer1_Load(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;
            o.conex();
            SqlCommand cmd = new SqlCommand();

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "ImpVoitureDispo";
            cmd.Connection  = o.cn;
            SqlDataAdapter da  = new SqlDataAdapter(cmd);
            DataTable      dt2 = new DataTable();

            da.Fill(dt2);


            VoitureDispo i = new VoitureDispo();

            i.SetDataSource(dt2);
            crystalReportViewer1.ReportSource = i;
            crystalReportViewer1.Refresh();
            o.Deconex();



            this.Cursor = Cursors.Default;
        }
Пример #2
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            VoitureDispo rpt = new VoitureDispo();

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