Salut untk anda yg meng-preview kan pake form instead of using Report2x yg 
lain,,
jadi saran saya, dari pada anda nulis coding banyak untuk preview dan 
cetak nya...
why don't u use Datareport?atau crystal report?????


Salam
Ronald Irawan
Pt. Sanghiang Perkasa
Gd. Graha Kirana Lt.5
Jl Yos Sudarso Kav.88
Jakarta



"Adhy Nunu" <[EMAIL PROTECTED]> 
Sent by: [email protected]
03/01/2006 03:22 PM
Please respond to
[email protected]


To
"indoprog-vb programmer vb" <[email protected]>
cc

Subject
[indoprog-vb] cara cetak di printer memakai vb







salam vb,
rekan2 saya sedang belajar VB 6.0 dengan database MS Access. Ada satu 
permasalahan dimana saya gagal mencetak tampilan di layar. Mohon 
pencerahannya, bagaimana caranya agar bisa nge-print? Thx B4.

Source Code :

Private Sub cmdCetak_Click()
   Call Table
   rs.Close
   Unload Me
End Sub
Private Sub Table()
   If rs2.RecordCount <> 0 Then
      rs2.MoveFirst
      banyakkolom = 6
      jumlahrecord = rs2.RecordCount
      ulangan = Round((jumlahrecord - (jumlahrecord Mod 45)) / 45) + 1
 
      Call CetakJudul 
End Sub

Private Sub CetakJudul()
   Form1.Show
   Form1.ScaleMode = vbCentimeters
   Form1.FontName = "Arial"
   Form1.FontSize = 8
 
 
   jarakhuruf = 0.16
   jarakbaris = 2
 
   Form1.CurrentX = 1
   Form1.CurrentY = 0.5
 
   Form1.Print "ULANG TAHUN"
   Form1.Print
   'Form1.Print ""
   Form1.CurrentX = 0
   Form1.Print
   Form1.CurrentX = 1
   Form1.Print "Bulan : "; cmbBulanDsp.Text
   Form1.Print
   Form1.CurrentY = Form1.CurrentY + jarakbaris
 
   posxawal = 1
   lebarx = 20
   posxakhir = posxawal + lebarx
   posy = 1
   posyawal = Form1.CurrentY
 
   Form1.Line (posxawal, posy)-(posxakhir, posy) '(1,1)-(21,1)
 
   posy = posy + jarakbaris ' 1+2 = 3
 
   Form1.Line (1, 3)-(50, 3) '(posxawal, posy)-(posxakhir, posy) 
'(1,3)-(21,3)
   posy = posy + 0.05
 
   sjudul1 = "N A M A  L E N G K A P"
   lebarkolom1 = 25
   kolomke1 = Round((lebarkolom1 - Len(sjudul1)) / 2)
   Form1.CurrentX = 1 'kolomke1 * jarakhuruf
   Form1.Print sjudul1;
 
   sjudul2 = "TITLE"
   lebarkolom2 = 10
   kolomke2 = Round(((lebarkolom2 - Len(sjudul2)) / 2 + lebarkolom1))
   Form1.CurrentX = 6 'kolomke2 * jarakhuruf
   Form1.Print sjudul2;
 
   sjudul3 = "TANGGAL LAHIR"
   lebarkolom3 = 10
   kolomke3 = Round(((lebarkolom3 - Len(sjudul3)) / 2 + lebarkolom1 + 
lebarkolom2))
   Form1.CurrentX = 8 'kolomke3 * jarakhuruf
   Form1.Print sjudul3;
 
   sjudul4 = "A L A M A T  R U M A H "
   lebarkolom4 = 20
   kolomke4 = Round(((lebarkolom4 - Len(sjudul4)) / 2 + lebarkolom1 + 
lebarkolom2 + lebarkolom3))
   Form1.CurrentX = 11 'kolomke4 * jarakhuruf
   Form1.Print sjudul4;
 
   sjudul5 = " K O T A "
   lebarkolom5 = 15
   kolomke5 = Round(((lebarkolom5 - Len(sjudul5)) / 2 + lebarkolom1 + 
lebarkolom2 + lebarkolom3 + lebarkolom4))
   Form1.CurrentX = 16 'kolomke5 * jarakhuruf
   Form1.Print sjudul5;
 
   sjudul6 = "K O D E  P O S"
   lebarkolom6 = 5
   kolomke6 = Round(((lebarkolom5 - Len(sjudul6)) / 2 + lebarkolom1 + 
lebarkolom2 + lebarkolom3 + lebarkolom4 + lebarkolom5))
   Form1.CurrentX = 17.5 'kolomke6 * jarakhuruf
   Form1.Print sjudul6;
 
End Sub






Disclaimer: Although this message has been checked for all known viruses
     using Trend Micro InterScan Messaging Security Suite, Bukopin
           accept no liability for any loss or damage arising
               from the use of this E-Mail or attachments.

[Non-text portions of this message have been removed]



Untuk berhenti berlangganan kirim email kosong ke : 
[EMAIL PROTECTED]

Ikuti juga forum diskusi VB.net dengan 
mengirim email kosong ke [EMAIL PROTECTED]
 
Yahoo! Groups Links



 






[Non-text portions of this message have been removed]



Untuk berhenti berlangganan kirim email kosong ke : [EMAIL PROTECTED]

Ikuti juga forum diskusi VB.net dengan 
mengirim email kosong ke [EMAIL PROTECTED]
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/indoprog-vb/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Kirim email ke