Solved

Can't Add Crystal Reports to WPF Application in Visual Studio 2010

Posted on 2010-09-16
3
1,244 Views
Last Modified: 2013-11-12
After downloading and installing the Crystal Reports package for VS 2010 and adding a generic report I get the following errors and warnings:

Errors...
-The type or namespace name 'Shared' does not exist in the namespace
-             "                                  'ReportSource'                "
...

Warnings...
The referenced assembly "CrystalDecisions.Shared, Version=14.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL" could not be resolved because it has a dependency on "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project.
...

It looks like it only works for a web project.  Will Crystal work in a WPF Application?  If so, how?
0
Comment
Question by:sbooth1117
  • 2
3 Comments
 
LVL 16

Accepted Solution

by:
13598 earned 500 total points
ID: 33701086
That is because you are using .net framework 4 Client.
Change it to .net framework 4 not client. That should resolve this error message.
0
 
LVL 16

Expert Comment

by:13598
ID: 33701160
To change the target .NET Framework version or profile
In Visual Studio, open the project you want to change.

Right-click the project in Solution Explorer and then click Properties.

In the Project Designer, locate the Target Framework list, as follows:
For Visual Basic projects, click the Compile tab and then click Advanced Compile Options. The Target Framework list is in the Advanced Compiler Settings dialog box.

For Visual C# projects, the Target Framework list is on the Application tab of the Project Designer. For more information, see Application Page, Project Designer (C#).

For Visual F# projects, the Target Framework list is on the Application tab of the Project Designer.


In the Target Framework list, select  .NET Framework 4 (only 4 NOT 4 Client).
When you click OK, the project unloads and then reloads in the integrated development environment (IDE). The project now targets the .NET Framework version that you just selected.
0
 

Author Closing Comment

by:sbooth1117
ID: 33702788
Great, that was it.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

758 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

19 Experts available now in Live!

Get 1:1 Help Now