Пример #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            PrintCorrectionCrystalReport rpt = new PrintCorrectionCrystalReport();

            rpt.Site = this.Site;
            return(rpt);
        }
Пример #2
0
        private void PrintAllCorrectionForm_Load(object sender, EventArgs e)
        {
            SqlConnection cn = connection.getConnection();
            PrintCorrectionCrystalReport cr = new PrintCorrectionCrystalReport();
            PrintCorrectionDataSet       ds = new PrintCorrectionDataSet();
            String         query1           = "select * from coercition_physique";
            SqlDataAdapter da = new SqlDataAdapter(query1, cn);

            da.Fill(ds, "coercition_physique");

            string         query2 = "select top(1) * from avocat";
            SqlDataAdapter da2    = new SqlDataAdapter(query2, cn);

            da2.Fill(ds, "avocat");

            cr.SetDataSource(ds);
            crystalReportViewer1.ReportSource = cr;
            crystalReportViewer1.Refresh();
        }