Solved

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

Posted on 2010-09-16
3
1,260 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
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…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

785 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