Selasa, 13 Desember 2011

PERTEMUAN 16

* dekalarasi Variabel
PUBLIC Kalimat, Kalimat1 as String
PUBLIC i,j,k,nilai as Integer



* Beri Nilai pada Variabel
kalimat ="LEZAT "
kalimat1 ="Rumah makan"
i = 1
nilai = 1
j = 1
k = 1


rumus timer 2 :
thisform.Label2.Caption = SUBSTR(Kalimat, 1,i)
i = i + 1
IF i = LEN(kalimat)
i = 0
ENDIF


rumus timer 1 :
SET CENTURY ON
Thisform.label1.caption=DMY(DATE())
thisform.label2.caption=TIME()

rumus timer 3 :
IF j=1
thisform.label1.Caption=SPACE(k) + kalimat1
k = k + 1
IF k = 23
j = 2
ENDIF
ELSE
thisform.label1.Caption = SPACE(k) + Kalimat1
k = k - 1
IF k = 0
j = 1
ENDIF
Endif

rumus timer 4 :

IF nilai=1
thisform.image1.Picture='E:\BAHAN_AJARKUPEMOGRAMAN_LANJUT\MANTAP\1.PNG'
nilai=2
ELSE
thisform.image1.Picture='E:\BAHAN_AJARKUPEMOGRAMAN_LANJUT\MANTAP\1.PNG'
nilai=1
Endif

Kamis, 08 Desember 2011

pertemuan 15

MENCARARI RUMUS MENGGUNAKAN REPORT CONTOL AB :


RUMUS MENCARI JUMLAH :

MENCARI NAMA MENU :

RUMUS BAYAR :

cara kedua :

cara ketiga :


rumus simpan :
WITH thisform
*Rekam Data Ketabel : HeaderPesan
SELECT 2
APPEND BLANK
replace NoNota with.text1.value
replace Tanggal with.text2.value
replace Potongan with.text4.value

*Simpan data pada grid ketabel DetailPesan
SELECT temp
GO top
DO while! EOF()
SELECT 3
APPEND BLANK
replace NoNota with.text1.value
replace KodeMenu WITH temp.KodeMenu
replace Harga WITH temp.Harga
replace Jumlah WITH temp.Jumlah

SELECT temp
SKIP && Maju 1 Record
ENDDO
cetak=ALLTRIM(thisform.text1.value)
thisform.text1.value=""
thisform.text2.value={}
thisform.text3.value=0
thisform.text4.value=0
thisform.text5.value=0
thisform.text1.setfocus
thisform.init
MESSAGEBOX("Data Telah Disimpan",64,"Informasi")

SELECT 2
SET FILTER TO nonota=cetak
REPORT FORM rptpesan.frx PREVIEW IN screen
endwith