plz explain me how to use crystalreports in visual basic in detail with an example.actually i have read so many books but still i m not cleared so plz explain me in detail through a good example also through coding and with database connectivity.
i hope i will get reply soon
thanks in advance
waiting 4 ur reply
The below Code will Work for External CR Desigen Report.
'StrRecordSelection Declare as String Globle
'StrRecordSelection wil Contain Record selection
'strreportpath Declare as String Globle
'strreportpath will contain Report path.
-
Private Sub Form_Load()
-
On Error Resume Next
-
' Setting
-
Set crystal = New CRAXDRT.Application 'MANAGES REPORTS
-
Set Report = Nothing
-
Set Report = crystal.OpenReport(strreportpath) 'OPEN REPORT
-
Report.Database.LogOnServer "pdsodbc.dll", <Database Name>, <DSN Name>, <User Name>, <Password>
-
If StrRecordSelection <> "" Then
-
Report.RecordSelectionFormula = StrRecordSelection
-
End If
-
Report.DiscardSavedData 'CLEARS REPORT SO WE WORK FROM RECORDSET
-
Cry.ReportSource = Report 'LINK VIEWER TO REPORT
-
Cry.ViewReport
-
Cry.Zoom 1
-
Set crystal = Nothing
-
StrRecordSelection = ""
-
strreportpath = ""
-
End Sub