コード例 #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            ListeProjets rpt = new ListeProjets();

            rpt.Site = this.Site;
            return(rpt);
        }
コード例 #2
0
        private void report_Load(object sender, EventArgs e)
        {
            try
            {
                MySqlConnection con = new MySqlConnection(Database.ConnectionString());
                ListeProjets    FP  = new ListeProjets();

                MySqlDataAdapter dab = new MySqlDataAdapter(query, con);
                DataSetProjet    DSP = new DataSetProjet();
                dab.Fill(DSP.DataTable1);

                FP.SetDataSource((DataTable)DSP.DataTable1);

                crystalReportViewer1.ReportSource = FP;
                crystalReportViewer1.Refresh();
                con.Close();
            }

            catch (Exception ex)
            {
                MessageBox.Show("Veuillez selectionner un projet \n" + ex.Message + "\n");
            }
        }