Ceriwis  

Go Back   Ceriwis > HOBI > Komputer & Teknologi > Programming

Programming Share, tanya jawab, saling bantu antar programmer dengan berbagai macam bahasa pemrograman.

Reply
 
Thread Tools
  #1  
Old 20th November 2011
Linuxmania Linuxmania is offline
Ceriwiser
 
Join Date: Nov 2011
Posts: 392
Rep Power: 14
Linuxmania mempunyai hidup yang Normal
Default HELLPP!! input data text dari VB6 ke Crystal Report

tolong master2 VB, aku newbie nih, lagi belajar VB6 n Crystal Report 8.5.

sekarang lagi bingung, kalo mau masukin data dari TEXBOX di VB ke Crystal Report gimana ya??data text doank master...plis bantuannya

aku lampirin ni crviewernya untuk koneksi database sql-servernya, masalahnya bingung masukin text langsung dari VB ke Crystal Report....butuh bantuan plisssss....




Quote:





Dim xServer As String

Dim xDatabase As String



Dim xApp As New CRAXDRT.Application

Dim REPORT As New CRAXDRT.REPORT



Private Sub Form_Load()

xServer = "server1"

xDatabase = "bank"



Set REPORT = xApp.OpenReport(App.Path & "\report\ReportVoucher5.rpt")

If frmdaftarbank.txtkode "" Then

REPORT.RecordSelectionFormula = "{TGLDTRAN.TR_NOVOC} = ('" & frmdaftarbank.txtkode.Text & "')"

REPORT.Database.LogOnServerEx "p2ssql.dll", xServer, xDatabase, "sa", "perfect"

REPORT.Database.Tables(1).SetLogOnInfo xServer, xDatabase, "sa", "perfect"

REPORT.DiscardSavedData

Else

Set xRpt = xApp.OpenReport(App.Path & "\report\ReportVoucher5.rpt")

xRpt.DiscardSavedData

xRpt.Database.LogOnServerEx "p2ssql.dll", xServer, xDatabase, "sa", "perfect"

xRpt.Database.Tables(1).SetLogOnInfo xServer, xDatabase, "sa", "perfect"

xRpt.Database.Tables(1).Location = xDatabase & ".dbo.TBLBANK"



End If



CRViewer1.ReportSource = REPORT

CRViewer1.ViewReport

CRViewer1.Zoom (100)

End Sub









Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


 


All times are GMT +7. The time now is 08:12 PM.


no new posts