how can i connect crystal report 10 to vb6.0? is it possible?
i really need to know how,,,
thanks in advance!

Recommended Answers

All 4 Replies

try this
look into ur Components in VB
find
"Crystal Report Control"
check it

then in your command button

put this codes

With CrystalReport1
Screen.MousePointer = vbHourglass
.WindowBorderStyle = crptFixedSingle
.WindowState = crptMaximized
.WindowTitle = "Users"
.ReportFileName = App.Path & "\FOLDERNAME\YOURREPORTNAME.rpt"
.WindowShowRefreshBtn = True
.DiscardSavedData = False
.Destination = crptToWindow
.Action = 1
Screen.MousePointer = vbDefault

End With

i used this code in connecting vb6 + CR8.5
maybe its kind of the same

hope it will help u somehow

the above code won't work with crpt10.
it is limited to version 8.5 only as their is no crystal report control available with versions 9 and above. all there is crystal report viewer. and its syntax is completely different.

make some googling.

ic... soo i wont wont work
maybe i start upgrading my CR to CR10 too, and learn the changes

check out this code

Public Sub DailyReportDisplay(Query As String)
   Set CRXReport = CrystalReport2
   Set CRXDb = CRXReport.Database
   CRXReport.DiscardSavedData
   inti = 1
   Do Until inti = CRXReport.Database.Tables.count + 1
   CRXReport.Database.Tables.Item(inti).SetLogOnInfo strdblocation, "<your table name>",      "<user id>", "<password>"
  inti = inti + 1
  Loop
  CrystalReport2.SQLQueryString = Query
  With FrmReport
   .Show
   .CRV1.ReportSource = CRXReport
   .CRV1.ViewReport
  End With
  Set CRXReport = Nothing
End Sub
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.