private void ReporteDonadoresType_Load(object sender, EventArgs e) { CrystalReport2 objRpt = new CrystalReport2(); string appPath = Path.GetDirectoryName(Application.ExecutablePath); String ConnStr = @"Data Source=" + appPath + @"\dbcar.s3db ;Version=3;"; System.Data.SQLite.SQLiteConnection myConnection = new System.Data.SQLite.SQLiteConnection(ConnStr); String Query1 = "SELECT * FROM Donaciones Where Apoyo = '" + apoyo1 + "'"; System.Data.SQLite.SQLiteDataAdapter adapter = new System.Data.SQLite.SQLiteDataAdapter(Query1, ConnStr); DataSet Ds = new DataSet(); // here my_dt is the name of the DataTable which we // created in the designer view. adapter.Fill(Ds, "my_dt"); // Setting data source of our report object objRpt.SetDataSource(Ds); // Binding the crystalReportViewer with our report object. this.crystalReportViewer1.ReportSource = objRpt; objRpt.Refresh(); }
public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { CrystalReport2 rpt = new CrystalReport2(); rpt.Site = this.Site; return(rpt); }
public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { CrystalReport2 rpt = new CrystalReport2(); rpt.Site = this.Site; return rpt; }
private void Rptpordonador_Load(object sender, EventArgs e) { CrystalReport2 objRpt = new CrystalReport2(); string appPath = Path.GetDirectoryName(Application.ExecutablePath); String ConnStr = @"Data Source=" + appPath + @"\dbcar.s3db ;Version=3;"; System.Data.SQLite.SQLiteConnection myConnection = new System.Data.SQLite.SQLiteConnection(ConnStr); String Query1 = "SELECT * FROM Donaciones Where Nombre = '"+nombre1+"' AND Edad = '"+edad1+"'"; System.Data.SQLite.SQLiteDataAdapter adapter = new System.Data.SQLite.SQLiteDataAdapter(Query1, ConnStr); DataSet Ds = new DataSet(); // here my_dt is the name of the DataTable which we // created in the designer view. adapter.Fill(Ds, "my_dt"); // Setting data source of our report object objRpt.SetDataSource(Ds); // Binding the crystalReportViewer with our report object. this.crystalReportViewer1.ReportSource = objRpt; objRpt.Refresh(); }