Lam Nal,

Gwe coba sesederhana mungkin
1. Buat label1 caption "Tanggal Awal" dan label2
caption "s/d"
2. Buat textbox1 dan textbox2
3. Command1 caption "Cetak" dan Command2 caption
"Keluar"
4. Ambil komponent Crystal Report kasih nama CR1
5. Ambil komponent data rujuk ke database MUTASI
fieldnya yang di KODEBARANG (tanggal | No.Bukti
|Deskripsi | Masuk | Keluar | Saldo
stok)
6. Ambil komponent ADODC1 rujuk ke T_kartu_stok_in
7. Ambil komponent ADODC2 rujuk ke T_kartu_stok_out
8. Lakukan pengulangan

if not adodc1.recorset.eof then
do while not adodc1.recordset.eof
if cdate(adodc1.recordset!tglawal)<textbox1.text and
cdate(adodc1.recordset!tglakhir)<textbox2.text then
data1.recorset.addnew
data1.recorset!Tanggal=adodc1.recorset!Tanggal
data1.recorset!NoBukti=adodc1.recorset!Nobukti
data1.recorset!Deskripsi=adodc1.recorset!Deskripsi
data1.recorset!Masuk=adodc1.recorset!Masuk
data1.recorset.update
end if
adodc1.recordset.movenext
loop
end if

if not adodc2.recorset.eof then
do while not adodc2.recordset.eof
if cdate(adodc2.recordset!tglawal)<textbox1.text and
cdate(adodc2.recordset!tglakhir)<textbox2.text then
if not data1.recorset.nomatch then
data1.recorset.edit
data1.recorset!Tanggal=adodc2.recorset!Tanggal
data1.recorset!NoBukti=adodc2.recorset!Nobukti
data1.recorset!Deskripsi=adodc2.recorset!Deskripsi
data1.recorset!keluar=adodc2.recorset!Keluar
data1.recorset.update
else
data1.recorset.addnew
data1.recorset!Tanggal=adodc2.recorset!Tanggal
data1.recorset!NoBukti=adodc2.recorset!Nobukti
data1.recorset!Deskripsi=adodc2.recorset!Deskripsi
data1.recorset!Keluar=adodc2.recorset!Keluar
data1.recorset.update
end if
end if
adodc1.recordset.movenext
loop
end if

if not data1.recorset.eof then
do while data1.recorset.eof then
if not data1.recordset.nomatch then
data1.recorset.edit
data1.recorset!SaldoAkhir=(data1.recorset!Masuk-data1.recorset!Keluar)
data1.recorset.update
end if
loop
end if

Mudahan Ngerti

Regards
Gege Nugroho

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


Wahana Programmer Groups Links

<*> Untuk mengunjungi sponsor milis ini, klik link berikut:
    http://wahanaprogrammer.net

<*> Untuk menghubungi owner milis ini, kirim email ke:
    [EMAIL PROTECTED]

<*> Konsultasi pemrogramman bisa chat disini:
    Yahoo! Messenger: wahanaprogrammer
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/Programmer-VB/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Kirim email ke