Listing Program Visual Foxpro Untuk Pencetakan

Sedikit contoh Listing Program Visual Foxpro Untuk Pencetakan :

CLEAR
CLEA ALL
LOCAL JmlFile
JmlFile = 0
WAIT WIND “Tunggu sebentar …” NOWA
JmlFile = ADIR(aFile,”data\*.DBF”)
WAIT CLEAR
LIST DATABASE TO FILE PROGRAM\Inf_Data.txt
IF JmlFile > 0
* persiapan pencetakkan …
LOCAL JmlField, JenisTag
JenisTag = “”
IF FILE(“PROGRAM\”+DTOS(DATE())+”.TXT”)
aa=”DELE FILE PROGRAM\”+DTOS(DATE())+”.TXT”
&aa
ENDIF
aa = “SET PRINTER TO PROGRAM\”+DTOS(DATE())+”.TXT ADDI”
&aa
SET PRINT ON
ASORT(aFile)
FOR j=1 TO JmlFile
WAIT WIND “["+ALLTRIM(STR(j))+"/"+ALLTRIM(STR(JmlFile))+"] FileName : “+ALLTRIM(aFile[j,1]) NOWAIT
nmafile = ALLTRIM(aFile[j,1])
USE “DATA\”+ALLTRIM(aFile[j,1]) IN 1 SHARED
JenisTag = “”
IF j=1
? ” STRUKTUR DATABASE : PASIEN”
? “—————————–“
ENDIF
? “["+ALLTRIM(STR(j))+"/"+ALLTRIM(STR(JmlFile))+"] File Name : “+nmafile
? CHR(218)+REPLICATE(CHR(196),16)+CHR(194)+REPLICATE(CHR(196),4)+   CHR(194)+REPLICATE(CHR(196),5)+CHR(194)+REPLICATE(CHR(196),3)+CHR(191)
? CHR(179)+” Name           “+CHR(179)+”Type”+CHR(179)+”Width”+CHR(179)+”Dec”+CHR(179)
? CHR(195)+REPLICATE(CHR(196),16)+CHR(197)+REPLICATE(CHR(196),4)+CHR(197) +REPLICATE(CHR(196),5)+CHR(197)+REPLICATE(CHR(196),3)+CHR(180)
JmlField = AFIELDS(AObjField)
FOR i=1 TO JmlField
? CHR(179)+” “+PADR(AObjField(i,1),15,” “)+CHR(179)+” “+PADR(AObjField(i,2),1,” “)+”  “+CHR(179)+TRANSFORM(AObjField(i,3),”@Z ###”)+;
”  “+CHR(179)+TRANSFORM(AObjField(i,4),”@Z ##”)+” “+CHR(179)
ENDFOR

? CHR(195)+REPLICATE(CHR(196),12)+Chr(194)+REPLICATE(CHR(196),3)+ CHR(193)+Chr(194)+REPLICATE(CHR(196),3)+CHR(193)+ REPLICATE(CHR(196),5)+CHR(193)+REPLICATE(CHR(196),3)+CHR(193)+REPLICATE(CHR(196),8)
? CHR(179)+” TAG        “+CHR(179)+”Type”+CHR(179)+”  Expresion & Filter”
? CHR(195)+REPLICATE(CHR(196),12)+Chr(197)+     REPLICATE(CHR(196),4)+Chr(197)+REPLICATE(CHR(196),10)+ REPLICATE(CHR(196),3)+REPLICATE(CHR(196),9)
FOR nCount = 1 TO 254
IF !EMPTY(TAG(nCount))  && Checks for tags in the index
DO CASE
CASE PRIMARY(nCount)
JenisTag = “P”
CASE CANDIDATE(nCount)
JenisTag = “C”
OTHERWISE
JenisTag = “R”
ENDCASE
? CHR(179)+” “+PADR(TAG(nCount),11,” “)+CHR(179)+”  “+JenisTag+” “+CHR(179)+Key(nCount)
? CHR(179)+SPACE(12)+CHR(179)+SPACE(4)+CHR(179)+FOR(nCount)      && Display .CDX names
ELSE
EXIT  && Exit the loop when no more tags are found
ENDIF
ENDFOR
? CHR(192)+REPLICATE(CHR(196),12)+Chr(193)+REPLICATE(CHR(196),4)+Chr(193)+ REPLICATE(CHR(196),10)+REPLICATE(CHR(196),3)+REPLICATE(CHR(196),9)
? “”
USE
ENDFO
WAIT CLEAR
SET PRINT OFF
SET PRINTER TO
MESSAGEBOX(“Proses telah dilakukan …”,0+64,””)
*——————-
ELSE
MessageBox(“Tidak ada DATABASE …!!!!”,0+16,””)
RETU .T.
ENDIF
CLOS ALL
CLEA ALL
clea

10 thoughts on “Listing Program Visual Foxpro Untuk Pencetakan

  1. halo, saya roby dari surabaya, interest dengan blog ini, gimana caranya bisa chatting langsung dengan anda ? mengenai program yang anda buat

  2. C ontoh listing untuk program akuntansi ada nggak, misalnya pembuatan laporan buku besar, gmana carax menghitung saldonya ya,,,,,
    critanya gini saldo awal debet 5.000.000
    transaksi preiode ini tgl 02 debet 4.000.000
    05 Debet 1.000.000
    07 kREDIT 3.000.000
    BAGAIMANA CRA PERHITUNGANNYA SUPAYA PADA BAGIAN DETAILS AKAN TAMPIL TERINCI
    SALDO AWAL BARIS PERTAMA PADA KOLOM SALDO
    KEMUDAIAN BARIS KEDUA SALDO + 4.000.000 HASILNYA DI TEMPATKAN KE KOLOM SALDO

    • ane pernah coba tuch… tapi ane pake VB.6 dan ane pake component one-true dbgrid memanfaatkan arraynya dbgrid jadi debet – kredit + saldo gan … :D untuk source-nya coba ane carikan di kompi ane … :d

    • kalo pake visual basic ane ngeri gan, kalo foxpro ane dah lupa gan cz udah gak pake foxpro lagi gan sori..sori :D

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Logout / Ubah )

Twitter picture

You are commenting using your Twitter account. Logout / Ubah )

Facebook photo

You are commenting using your Facebook account. Logout / Ubah )

Google+ photo

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s