public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            PrintAllPlainteCrystalReport1 rpt = new PrintAllPlainteCrystalReport1();

            rpt.Site = this.Site;
            return(rpt);
        }
Exemple #2
0
        private void PrintAllPlaintes_Load(object sender, EventArgs e)
        {
            try
            {
                PrintAllPlainteCrystalReport1 c  = new PrintAllPlainteCrystalReport1();
                PrintAllPlaintDataSet         ds = new PrintAllPlaintDataSet();
                SqlConnection  cn    = connection.getConnection();
                string         query = "select p.*,pl.nom from plaignant pl,plainte p where p.id_plaignant=pl.id_plaignant and p.etat='non archivé'";
                SqlDataAdapter da    = new SqlDataAdapter(query, cn);
                da.Fill(ds, "plainte");

                string         query1 = "select top(1) * from avocat";
                SqlDataAdapter da1    = new SqlDataAdapter(query1, cn);
                da1.Fill(ds, "avocat");

                c.SetDataSource(ds);
                crystalReportViewer1.ReportSource = c;
                crystalReportViewer1.Refresh();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.StackTrace);
            }
        }