Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2010-09-16
3
Medium Priority
?
1,302 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 16

Accepted Solution

by:
13598 earned 2000 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

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
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…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

721 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