Arsip: Hasil Print Rata Kanan
more 16 years ago
rusli_chow
Rekan2 sekalian, saya mau tanya gimana algoritmanya supaya hasil print kita rata kanan. Misalnya :
00001 Pulpen 2000
00002 Buku 10000
00003 Handphone
3 X 1000000 3000000
--------------------------------------
Total 3012000
Mohon bantuannya.
more 16 years ago
bobby_pro
@rusli_chow, coba anda lihat set properti'y
sample
QRDBText1.align:=<ambil yg rata kanan>
semoga membantu
more 16 years ago
rusli_chow
Sorry mas, tapi yang saya maksud hasil printnya. Saya pake komponen TRawPrinter. Property untuk alignment gak ada.
more 16 years ago
deLogic
hmmm sudah mampir ke sini: http://delphindo.wordpress.com/2006/03/28/direct-text-printing/
oiya, itu font cetakan nya monospace kan yak, jadinya lebar tiap huruf sama.. nah kalo gitu tinggal ber-imajinasi bermain2 dengan lebar kertas, panjang kalimat dalam satu baris tersebut dan penggandaaan spasi.
more 16 years ago
herux
Kalo u mau, tambahin aja di TRawPrinter nya function di bawah ini (Tapi ngomong dulu yah sama embah delphi yg buat.. siapa hayo ??), ato u turunin
kalo gak mau gunakan seadanya dech.
function padl(s:string;l:byte): string;
begin
If length(s) < l then
begin
s:= s + space(l - length(s))
end;
padl:= s;
end;
function padr(s:string;l:byte):string;
begin
If length(s) < l then
begin
s:= space(l-length(s)) + s;
end;
padr:= s;
end;
function space(l:byte): string;
var S : array of char;
St : String;
begin
Fillchar(S,Sizeof(S),' ');
St:= S;
SetLength(St,l);
Space:= St;
end;
function right(s:string;l:byte): string;
begin
right:= copy(S,Length(S)-l+1,l)
end;
function left(s:string;l:byte): string;
begin
left:= copy(S,1,l);
end;
more ...
- Pages:
- 1
reply |
Report Obsolete
Last Articles
Last Topic
- PascalTalk #6: (Podcast) Kuliah IT di luar negeri, susah gak sih?
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #5: UX: Research, Design and Engineer
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #4: Obrolan Ringan Seputar IT
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #2: Membuat Sendiri SMART HOME
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #3: RADically Fast and Easy Mobile Apps Development with Delphi
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #1: Pemanfaatan Artificial Intelligence di Masa Covid-19
by LuriDarmawan in Tutorial & Community Project more 4 years ago - Tempat Latihan Posting
by LuriDarmawan in OOT more 4 years ago - Archive
- Looping lagi...
by idhiel in Hal umum tentang Pascal Indonesia more 12 years ago - [ask] koneksi ke ODBC user Dsn saat runtime dengan ado
by halimanh in FireBird more 12 years ago - Validasi menggunakan data tanggal
by mas_kofa in Hal umum tentang Pascal Indonesia more 12 years ago
Random Topic
- Preview Quick Report
by vikraa in Reporting more 17 years ago - Licensi Delphi
by farhan_port in Hal umum tentang Pascal Indonesia more 17 years ago - Cek syntax SQL pada delphi...gimana ya..?
by palapetir in MsSQL more 18 years ago - Buat Protocol Handler seperti Yahoo Messenger
by ardie_b in Bedah Kasus more 16 years ago - nanya koneksi mysql over internet gimana caranya yah?
by arif_amm in MySQL more 15 years ago - Firebird alias record
by vera in FireBird more 16 years ago - Menampilkan data tertentu aja
by aditya_online2008 in Reporting more 16 years ago - mohon bantuannya yang mengerti display format pada editbox
by arif_amm in Tip n Trik Pemrograman more 12 years ago - query tanggal di firebird
by madi in FireBird more 16 years ago - [ASK] Tentang Count
by j3free in MySQL more 15 years ago