on 12-30-2014 8:10 PM
Hello,
I'm upgrading an old software developed with VS2008 and Crystal Reports for VS2008. I'm trying to migrate reports to a recent version, i've tried with VS2013 and Crystal Reports Runtime (x64) 13.0.12.1494
The problem I'm facing is that i can pass parameters to the reports but the report is not using them. If i use the preview from the report there's no problem but passing the parameters from code or even letting the report prompt ask for them cause the problem.
It doesn't matter the type of parameters (number, string, datetime), the report has the same behaviour for all of them.
W8.1
VB.net
.Net Framework 4.5
VS2013
CR Runtime 13.0.12.1494
There are a couple of things that might be affecting this.
1. When you use the .NET Framework 4.x, there is a new property that has to be set for each of the CrystalDecisions references - it's called "Embed Interop Types" and it MUST be set to false.
2. Make sure that you're using the full .NET Framework 4.5 and not the .NET Client Framework 4.5.
3. Installing one of the "Runtime" downloads from here http://scn.sap.com/docs/DOC-7824 will not integrate the SDK into Visual Studio. Instead, you need to download and install the "Install Executable" to get that integration. You'll use the runtime install when you deploy your application.
-Dell
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dell, Thanks for you answer.
I've checked everything you wrote:
1.- All reference's Embed Interop Types properties are set to false
2.- .Net Framework 4.5 is the full version
3.- I've installed the "Install Executable" version for 13.0.12.1494 runtime, this is the link: http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_13_0_12.exe
But....everything remains the same.
is there any other possible solution?
thanks in advance
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
That looks good to me.
Here's my other thought..... Is the Crystal 2008 or Crystal for VS 2008 SDK installed on the computer where you're writing this code in VS 2013? If so, that's your problem - the two SDKs can't be installed on the same development machine. So you'll have to uninstall the Crystal SDK that's being used in VS 2008 or work from a machine (or VM) where VS 2008 is not installed.
-Dell
Maybe this can help. I found a thread, without answer unfortunately, with the same issue
Hi Rafael
I'd like you to have a look at the parameter sample apps in this wiki:
Crystal Reports for .NET SDK Samples - Business Intelligence (BusinessObjects) - SCN Wiki
Possibly starting with vbnet_win_paramengine, will be the best thing to do.
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow us on Twitter
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.