Re: help with crystal viewer
G'd evening Yulis!
I'm don't know how it works in vb 2k5, but in 2k3 the sintax (for external report) might be like this:
Code:
Imports CrystalDecisions.CrystalReports.Engine
Private anySub()
Dim rpt As New ReportDocument
rpt.Load("c:\YourReport.rpt")
rpt.SetParameterValue("@sqlParameter", parameterValue)
CrystalReportViewer.ReportSource = rpt
End Sub
If the report is part of your solution, you can use the cr viewer load event. Something like this:
Code:
Private Sub CrystalReportViewer1_Load(ByVal sender As System.Object,ByVal
As System.EventArgs) Handles CrystalReportViewer1.Load
Dim myReport As CrystalDecisions.CrystalReports.Engine.ReportDocument
myReport = New YourReport
CrystalReportViewer1.ReportSource = myReport
End Sub
Good luck
Estuardo