Tuesday, December 30, 2008

Declare Cursor

sql_perintah="select th"+ string(ii_tahun) +"from gaji_pokok where kd_golongan= ?"

DECLARE my_cursor DYNAMIC CURSOR FOR SQLSA;

PREPARE SQLSA FROM :sql_perintah;
OPEN DINAMIC my_cursor using :kd_golongan;
FETCH my_cursor INTO :id_tahun;

If sqlca.sqlcode = 100 then
messagebox('Informasi','data tidak ada')
End if

CLOSE my_cursor;

Wednesday, December 10, 2008

get datawindows

many type of data windows can use for reporting or form, Usualy for reporting you can use tabular type
get the data windows
dw_1.reset()
dw_1.retrieve() // get the datawindow ( dw_1)
dw_1.retrieve(unit,tgl_proses) //get the datawindow ( dw_1) with parameter

Monday, December 1, 2008

Send Variabel to Datawindow

send variabel tertentu to data windows :

d_1.setitem( baris , 'field_datawindows ' , variabel )

contoh:
dw_1.setitem(dw_1.getrow(),'alamat',ls_alamat)

for baris = 1 to dw_1.rowcount()

dw_1.setitem(baris,'alamat',ls_alamat)

next