Ejemplo n.º 1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            CrystalReport3 rpt = new CrystalReport3();

            rpt.Site = this.Site;
            return(rpt);
        }
Ejemplo n.º 2
0
 private void flatButton5_Click(object sender, EventArgs e)
 {
     if (dataGridView1.CurrentRow == null)
     {
         MessageBox.Show("لم يتم تحديد أي فاتورة", "خطأ", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     else
     {
         string           sql = "data source = Data.db";
         SQLiteConnection con = new SQLiteConnection(sql);
         DS2            ds    = new DS2();
         CrystalReport3 cr3   = new CrystalReport3();
         Print1         p1    = new Print1();
         con.Open();
         SQLiteDataAdapter da = new SQLiteDataAdapter("select Bills_id,Bills_members_name,Bills_date,Bills_date_update,Bills_sum from Bills2", con);
         da.Fill(ds, "Bills2");
         cr3.SetDataSource(ds.Tables["Bills2"]);
         p1.crystalReportViewer1.ReportSource = cr3;
         p1.Show();
         this.Close();
     }
 }