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

            rpt.Site = this.Site;
            return(rpt);
        }
Exemplo n.º 2
0
        private void PrintAllNotificationsForm_Load(object sender, EventArgs e)
        {
            SqlConnection                     cn = connection.getConnection();
            PrintNotificationDataSet          ds = new PrintNotificationDataSet();
            PrintAllNotificationCrystalReport cr = new PrintAllNotificationCrystalReport();

            string         query = "select * from notification";
            SqlDataAdapter da    = new SqlDataAdapter(query, cn);

            da.Fill(ds.Tables["notification"]);

            query = "select top(1) * from avocat";
            SqlDataAdapter da1 = new SqlDataAdapter(query, cn);

            da1.Fill(ds.Tables["avocat"]);

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