I have converted a VS2003 vb.net application to VS2010. The previous VS2003 version used CR XI. I downloaded the latest version of CR for the vs2010 version and everything seemed to go smoothly. The code converted beautifully, but when trying to run the report, I am now receiving a missing parameter error. I am pulling the data into CR via a stored procedure. My code is below:
Case 2 'Job Site Totals with all Questions
cmdSetUp.Parameters("@ManagerID").Value = Session("SessionManagerID")
cmdSetUp.ExecuteNonQuery()
cmdSetUp.Dispose()
'Set up dataset for crystal report Main
cmdCrystalReport_Main_TotalWithAllQuestions.Parameters("@ManagerID").Value = Session("SessionManagerID")
Qadapter.SelectCommand = cmdCrystalReport_Main_TotalWithAllQuestions
Dim ds As New DataSet
Qadapter.Fill(ds)
cmdCrystalReport_Main_TotalWithAllQuestions.Dispose()
'Create an instance of the strongly-typed report object for Main
crReportDocument = New JobSiteTotals
crReportDocument.SetDataSource(ds)
CrystalReportViewer1.ReportSource = crReportDocument
Qadapter.Dispose()
ds.Dispose()
CrystalReportViewer1.HasExportButton = False
Me.CrystalReportViewer1.ReportSource = crReportDocument
crReportDocument.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, False, "")
DataBind()
I am receiving the missing parameter value on this line: crReportDocument.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, False, "")
Any suggestions on what is going on and how I can correct this?