Sabtu, 16 Oktober 2010

Source Code Print Barcode dengan SATO 3200

Sudah di coba menggunakan Sato DR300
if ComPort1.Connected then
Begin
str := CHR(2);
ComPort1.Writestr(Str);
str := CHR(27)+’A';
ComPort1.Writestr(Str);
str := CHR(27) + ‘M’ + ’000′ + ’1025′ + ’020′ + ‘-08′ + ‘+00′ + ’0′ + ’000′ + ’000′;
ComPort1.Writestr(Str);
str := CHR(27) + ‘L01′ + ’1′ + ’0′ + ’1′ + ’0030′ + ’210′ + ’0′ + ’04′ + ’40′ + ’31′ + ’000000000000000000000000000000′;
ComPort1.Writestr(Str);
str := CHR(27) + ‘D01′ + nama;
ComPort1.Writestr(Str);
str := CHR(27) + ‘L02′ + ’1′ + ’0′ + ’1′ + ’0110′ + ’310′ + ’0′ + ’02′ + ’15′ + ’32′ + ’000000000000000000000000000000′;
ComPort1.Writestr(Str);
str := CHR(27) + ‘D02′ + ‘Rp. ‘ + FormatFloat(‘#,##0′,terkecil);
ComPort1.Writestr(Str);
str := CHR(27) + ‘L03′ + ’1′ + ’0′ + ’2′ + ’0075′ + ’290′ + ’0′ + ’02′ + ’15′ + ’11′ + ’000000000000000000000000000000′;
ComPort1.Writestr(Str);
str := CHR(27) + ‘D03′ + barcode;
ComPort1.Writestr(Str);
str := CHR(27) + ‘L04′ + ’1′ + ’0′ + ’2′ + ’0160′ + ’150′ + ’0′ + ’02′ + ’40′ + ’11′ + ’000000000000000000000000000000′;
ComPort1.Writestr(Str);
str := CHR(27) + ‘D04HARGA BANDED’;
ComPort1.Writestr(Str);
str := CHR(27) + ‘L05′ + ’1′ + ’0′ + ’2′ + ’0160′ + ’400′ + ’0′ + ’02′ + ’40′ + ’11′ + ’000000000000000000000000000000′;
ComPort1.Writestr(Str);
str := CHR(27) + ‘D05HARGA GROSIR’;
ComPort1.Writestr(Str);
str := CHR(27) + ‘L06′ + ’1′ + ’0′ + ’2′ + ’0165′ + ’385′ + ’0′ + ’02′ + ’40′ + ’31′ + ’000000000000000000000000000000′;
ComPort1.Writestr(Str);
str := CHR(27) + ‘D06I’;
ComPort1.Writestr(Str);
str := CHR(27) + ‘L07′ + ’1′ + ’0′ + ’1′ + ’0188′ + ’165′ + ’0′ + ’02′ + ’15′ + ’32′ + ’000000000000000000000000000000′;
ComPort1.Writestr(Str);
str := CHR(27) + ‘D07′+’Rp. ‘+ FormatFloat(‘#,##0′,hbanded);
ComPort1.Writestr(Str);
str := CHR(27) + ‘L08′ + ’1′ + ’0′ + ’1′ + ’0188′ + ’425′ + ’0′ + ’02′ + ’15′ + ’32′ + ’000000000000000000000000000000′;
ComPort1.Writestr(Str);
str := CHR(27) + ‘D08′ + ‘Rp. ‘ + FormatFloat(‘#,##0′,hgrosir);
ComPort1.Writestr(Str);
str := CHR(27)+’Q'+IntToStr(qty);
ComPort1.Writestr(Str);
str := CHR(27)+’Z';
ComPort1.Writestr(Str);
str := CHR(3);
ComPort1.Writestr(Str);
End;

Tidak ada komentar:

Posting Komentar