Solved

Crystal Reports and Visual Studio 2010

Posted on 2013-01-07
3
710 Views
Last Modified: 2013-01-13
Currently, I am upgrading a project from vs2008 to vs2010 and am having a problem with the Crystal Reports add-in. I have downloaded and installed the CR for vs2010 add in, however, it no longer contains a reference that I was using: CrystalDecisions.Shared.

I was using this for three methods:
OpenReportMethod
ParameterValues
ParameterDiscreteValue


Does anyone know what replaced this in the 2010 version or how to access CrystalDecisions.Shared in vs2010? Any suggestions are welcome.

Here is the block of code that I am working with:
' create a new temporary copy of the selected report
                    CR.Load(RptPath, OpenReportMethod.OpenReportByTempCopy)

                    ' Declare SchoolNumber parameter variable
                    Dim prSchoolNumber As ParameterValues = New ParameterValues
                    Dim prSchoolNumberDisVal As ParameterDiscreteValue = New ParameterDiscreteValue ' ParameterDiscreteValue
                    'Set the SSN entered as the discrete value
                    prSchoolNumberDisVal.Value = Me.fSchool.Text
                    prSchoolNumber.Add(prSchoolNumberDisVal)
                    CR.DataDefinition.ParameterFields("@SchoolNumber").ApplyCurrentValues(prSchoolNumber)

As a note, I did attempt to change my target framework, however am missing the option to do so, unless I am blind. Please see the attached screenshot.

Thank you.
vs2010.jpg
0
Comment
Question by:jbeese
  • 2
3 Comments
 
LVL 8

Expert Comment

by:Crashman
ID: 38752865
thats sounds weird

I use VS2010 and the reference exist.

<Reference Include="CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL" />

in the proyect

Imports CrystalDecisions.Shared
reference 2reference 1
0
 
LVL 1

Accepted Solution

by:
jbeese earned 0 total points
ID: 38755721
I found the issue I was having. I read on another website that the issue was with the target framework being set to .Net Framework 4 Client Profile when it should just be .Net Framework 4. However, it also said that the option to change this was in the application tab of the project properties (where it was not). After more research, I found that the option to change the target framework now resides in project properties > Compile > Advanced Compile Options. Once I changed my target framework, I was able to include the missing reference and my errors disappeared.
0
 
LVL 1

Author Closing Comment

by:jbeese
ID: 38771601
Fixed my problem.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now