Here is the code:
Dim CR As New ReportDocument
CR.SetDatabaseLogon("<user>", "<password>")
CR.ParameterFields("desde").CurrentValues.AddValue(CDate(txtDesde.Text))
CR.ParameterFields("hasta").CurrentValues.AddValue(CDate(txtHasta.Text))
CR.ParameterFields("idTienda").CurrentValues.AddValue(cmbTiendas.SelectedValue)
frmReporte.asignaInforme(CR)
frmReporte.Show()
frmReporte is a windows form containing a CrystalDecisions.Windows.Forms.CrystalReportViewer object named CRinforme, the code in this form is
Dim crInf As New ReportDocument
Public Sub asignaInforme(ByVal cr As ReportDocument)
crInf = cr
CRInforme.ReportSource = crInf
End Sub
Anyway, i've tried to open the report without passing any parameter and writing the values when the report asked for them, didn't work. The same code for VS2008 works fine.
The references of CrystalDecisions have been loaded from the folder C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet\ don't know if that could help you