public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { laporanKegiatan rpt = new laporanKegiatan(); rpt.Site = this.Site; return(rpt); }
private void btnTampil_Click(object sender, EventArgs e) { laporanKegiatan rprtKegiatan = new laporanKegiatan(); try { rprtKegiatan.SetDatabaseLogon("probis", "probis"); } catch (Exception) { throw; } OracleCommand query = new OracleCommand(); query.Connection = conn; OracleDataAdapter adapter = new OracleDataAdapter(query); DataSet dataset = new DataSet(); query.CommandText = "SELECT * FROM CUSTOMER"; adapter.Fill(dataset, "CUSTOMER"); query.CommandText = "SELECT * FROM DHOTEL"; adapter.Fill(dataset, "DHOTEL"); query.CommandText = "SELECT * FROM DPAKET where tour_id='" + comboBox1.SelectedValue.ToString() + "'"; adapter.Fill(dataset, "DPAKET"); query.CommandText = "SELECT * FROM DTRANS"; adapter.Fill(dataset, "DTRANS"); query.CommandText = "SELECT * FROM FLIGHT"; adapter.Fill(dataset, "FLIGHT"); query.CommandText = "SELECT * FROM HOTEL"; adapter.Fill(dataset, "HOTEL"); query.CommandText = "SELECT * FROM HTRANS; "; adapter.Fill(dataset, "HTRANS"); query.CommandText = "SELECT * FROM MASKAPAI"; adapter.Fill(dataset, "MASKAPAI"); query.CommandText = "SELECT * FROM PAKET_TOUR"; adapter.Fill(dataset, "PAKET_TOUR"); query.CommandText = "SELECT * FROM PEGAWAI"; adapter.Fill(dataset, "PEGAWAI"); query.CommandText = "SELECT * FROM TRAINS"; adapter.Fill(dataset, "TRAINS"); rprtKegiatan.SetDataSource(dataset); //rprtTransaksi.SetParameterValue("tanggal_awal", dtAwal.Value); //rprtTransaksi.SetParameterValue("tanggal_akhir", dtAkhir.Value); crystalReportViewer1.ReportSource = rprtKegiatan; }