public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { LaporanFasilitas rpt = new LaporanFasilitas(); rpt.Site = this.Site; return(rpt); }
private void btnTampil_Click(object sender, EventArgs e) { LaporanFasilitas rprtFasilitas = new LaporanFasilitas(); try { rprtFasilitas.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 DISTINCT replace(dkendaraan,'BIS',null)as DKENDARAAN,replace(dhotel_nama,'DALAM PERJALANAN',null) as DHOTEL_NAMA FROM DPAKET where tour_id='" + comboBox1.SelectedValue.ToString() + "'and dkendaraan != 'BIS' or dhotel_nama!='DALAM PERJALANAN order by 1' "; 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"); rprtFasilitas.SetDataSource(dataset); //rprtTransaksi.SetParameterValue("tanggal_awal", dtAwal.Value); //rprtTransaksi.SetParameterValue("tanggal_akhir", dtAkhir.Value); crystalReportViewer1.ReportSource = rprtFasilitas; }