Arsip: Parameter utk report

more 13 years ago
l1th1um
ane g bikin report. Datasetny ane bikin Query seperti ini
SELECT DISTINCT D.Tahun, D.Januari, d1.IdCustomer, d1.Nama, D2.Januari
FROM "pembayaran.DB" D, "customer.db" d1, "pemakaian.DB" D2
WHERE
(d1.IdCustomer = D.IdCustomer)
AND (D2.IdCustomer = d1.IdCustomer) AND (D.Tahun = :thn)
ORDER BY d1.IdCustomer
trs di form laporan nya pake 2 ComboBox
- CBTahunLaporan
- CBBulan Laporan
di even onclick ane bkn prosedur
procedure TForm2.Button5Click(Sender: TObject);
var
begin
DM.QReport.Close;
DM.QReport.ParamByName('thn').AsInteger := StrToInt(CBTahunLaporan.Text);
DM.QReport.open;
LapBulananSQL.QRBulan.Caption := CBBulanLaporan.Text;
LapBulananSQL.QRTahun.Caption := CBTahunLaporan.Text;
LapBulananSQL.Preview;
end;
tapi koq yang muncul semua tahun, ga spesifik tahun dari CBTahunLaporan
terus
D.Januari
mo ane bikin parameter jg. ane coba
D.:bulan
ternyata salah :D
more 13 years ago
ImanD
sebelum ke report coba test dulu query secara manual sesuai dengan harapan ga?klo ngga, ditampilin di dbgrid dulu...coba test!

more 13 years ago
mas_kofa
tapi koq yang muncul semua tahun, ga spesifik tahun dari CBTahunLaporanbiasanya kalo pake distinct "select distinct field1, field2,...........from....." yang tampil hanya filed pertama aja field1........... kenapa spt itu.........? ampe skrg aku belom tau jawabannya..??

more 13 years ago
l1th1um
hasil query sih udah muncul, cmn pengen pake parameter. nah pas parameter itu g jalan. sy nyoba tampilin januari pake
D.Januarinah klo diganti jadi
D.:bulanitu jadi salah. mungkin kesalahan format, cuman g tau gmana yang benernya :D kemudian parameter tahun, even saya masukin taunny 2007, tapi 2008 juga ikut masuk k report

more 13 years ago
Anonymous
SELECT DISTINCT
D.Tahun,
D.Januari,
d1.IdCustomer,
d1.Nama,
D2.Januari
FROM
"pembayaran.DB" D
INNER JOIN "customer.db" d1 ON (d1.IdCustomer = D.IdCustomer)
INNER JOIN "pemakaian.DB" D2 ON (D2.IdCustomer = d1.IdCustomer)
WHERE
(D.Tahun = :thn)
ORDER BY d1.IdCustomer
silahkan di coba?!

more 13 years ago
ImanD
cobain dgn ini:
procedure TForm2.Button5Click(Sender: TObject);
begin
with DM.QReport, LapBulananSQL do
begin
Close;
SQL.Text:=Format('SELECT DISTINCT D.Tahun, D.%s, d1.IdCustomer, d1.Nama, D2.Januari '+
'FROM "pembayaran.DB" D, "customer.db" d1, "pemakaian.DB" D2 '+
'WHERE (d1.IdCustomer = D.IdCustomer) AND (D2.IdCustomer = d1.IdCustomer) AND (D.Tahun=%s) '+
'ORDER BY d1.IdCustomer',);
Open;
QRBulan.Caption := CBBulanLaporan.Text;
QRTahun.Caption := CBTahunLaporan.Text;
Preview;
end;
end;

more 13 years ago
l1th1um
koq ga keluar apa2 yah bos?
ane coba di DataModule Masukin
SELECT DISTINCT D.Tahun, :bulan, d1.IdCustomer, d1.Nama, :bulan2 '+
'FROM "pembayaran.DB" D, "customer.db" d1, "pemakaian.DB" D2 '+
'WHERE (d1.IdCustomer = D.IdCustomer) AND (D2.IdCustomer = d1.IdCustomer) AND (D.Tahun=:tahun) '+
'ORDER BY d1.IdCustomer',);
di Event onclick ane kasih
DM.QReport.ParamByName('bulan').AsString := concat('D:'+CBBulanLaporan.Text);
DM.QReport.ParamByName('bulan2').AsString :=concat('D:'+CBBulanLaporan.Text);
DM.QReport.ParamByName('thn').AsInteger := StrToInt(CBTahunLaporan.Text);
di Params dah diset, bulan sama bulan2 type data string, tahun integer
skrg muncul, cuman nilainya nol
gmana yah ?more ...
- Pages:
- 1
reply |
Report Obsolete
Last Articles
- Project Group dalam Lazarus
- FastPlaz Database Explorer
- Release: FastPlaz Super Mom v0.12.22
- PascalClass #3: Web Development with Free Pascal
- Makna Pascal di Pascal Indonesia
- Kulgram : Instalasi Lazarus di Perangkat Berbasis ARM
- PascalClass #1: Analisa Database dan Machine Learning
- PascalTalk #6: (Podcast) Kuliah IT di luar negeri, susah gak sih?
- Mengenal OXYGENE – Pascal For .NET
- PascalTalk #5: UX: Research, Design and Engineer
Last Topic
- PascalTalk #6: (Podcast) Kuliah IT di luar negeri, susah gak sih?
by LuriDarmawan in Tutorial & Community Project more 3 months ago - PascalTalk #5: UX: Research, Design and Engineer
by LuriDarmawan in Tutorial & Community Project more 3 months ago - PascalTalk #4: Obrolan Ringan Seputar IT
by LuriDarmawan in Tutorial & Community Project more 4 months ago - PascalTalk #2: Membuat Sendiri SMART HOME
by LuriDarmawan in Tutorial & Community Project more 4 months ago - PascalTalk #3: RADically Fast and Easy Mobile Apps Development with Delphi
by LuriDarmawan in Tutorial & Community Project more 4 months ago - PascalTalk #1: Pemanfaatan Artificial Intelligence di Masa Covid-19
by LuriDarmawan in Tutorial & Community Project more 4 months ago - Tempat Latihan Posting
by LuriDarmawan in OOT more 1 years ago - Archive
- Looping lagi...
by idhiel in Hal umum tentang Pascal Indonesia more 8 years ago - [ask] koneksi ke ODBC user Dsn saat runtime dengan ado
by halimanh in FireBird more 8 years ago - Validasi menggunakan data tanggal
by mas_kofa in Hal umum tentang Pascal Indonesia more 8 years ago
Random Topic
- Koneksi delphi - mysql lewat HTTP protocol
by bosenjadiprogrammer in MySQL more 14 years ago - Bahasa C++
by fafa in Network, Files, I/O & System more 12 years ago - Mohon masukan tentang Version Control (svn,git, dll)
by mambamaestro in Enginering more 10 years ago - vcl Barcode
by strike_set in Tutorial & Community Project more 13 years ago - Layar Sentuh :: Touch Screen
by Tbawor in Enginering more 13 years ago - Menampilkan stok barang berdasarkan tanggal
by deded in Hal umum tentang Pascal Indonesia more 8 years ago - Delphi for PHP
by Kecret in OOT more 13 years ago - Ask: Delphi - MySQL ?
by cyber_hecker in MySQL more 15 years ago - Bagaimana cara Convert Share Path ke Local Path
by abichoy in Tip n Trik Pemrograman more 11 years ago - Perintah delete nya Zoes ko ga berfungsi???
by ianhade in Tip n Trik Pemrograman more 12 years ago