Hello,
I am using Visual Studio 2008 and SQL Server 2008
I have added a CR using the report wizard that connects to a simple stored procedure with 3 params. When I run the report I get a pop up indicating that the "Load report failed". I then cancel out of the "Enter Parameter Values" and on the 2nd try the report loads correctly (sometimes it taskes 2 or 3 times). I am guessing that I have something configured incorrectly but not sure what - here is the code used to call the report:
CrystalReportViewer1.ReportSource = New ActivitiesReport
Dim field1 As ParameterField = Me.CrystalReportViewer1.ParameterFieldInfo(0)
Dim field2 As ParameterField = Me.CrystalReportViewer1.ParameterFieldInfo(1)
Dim field3 As ParameterField = Me.CrystalReportViewer1.ParameterFieldInfo(2)
Dim val1 As New ParameterDiscreteValue()
Dim val2 As New ParameterDiscreteValue()
Dim val3 As New ParameterDiscreteValue()
Dim employee As String = GetSystemEmployeeName()
val1.Value = employee
val2.Value = calBeginDate.Value
val3.Value = calEndDate.Value
field1.CurrentValues.Add(val1)
field2.CurrentValues.Add(val2)
field3.CurrentValues.Add(val3)
Any help would be greatly appreciated - especially a link to a Best Practices tutorial involving programatically loading CR's with parameters!! I remember when I was in college 8 years ago CR Best Practice examples were readily available from both MS and Crystal Reports.
Edited by _charles - 20 Oct 2010 at 11:04am