For connecting VB6 with Crystal Report 9.
I got some samples codes like below i copied
but when i declare the variable as crystalreport1 its not coming
this line not working
"Dim Report As New CrystalReport1"
please tell me which are the things we need to work this
and please read the below sample codings and and correct it if any mistake is there
thank you for your ongoing support and help
Nishab Kottaram
sample codes :
CrystalReport.rpt
CRViewer91 is the view you design
'
VB 6 form
Dim Report As New CrystalReport1
Private Sub Form_Load()
Screen.MousePointer = vbHourglass
'Report.Database.LogOnServer "P2ssql.dll", "servername", "database", "sa", "password" <---not required
Report.Database.Tables.Item(1).ConnectionPropertie s.Item("password") = "password"
CRViewer91.ReportSource = Report
CRViewer91.ViewReport
Screen.MousePointer = vbDefault
End Sub
Private Sub Form_Resize()
CRViewer91.Top = 0
CRViewer91.Left = 0
CRViewer91.Height = ScaleHeight
CRViewer91.Width = ScaleWidth
End Sub