Crystal report in wpf Browser Application (xbap)

890 Views Asked by At

I want to use crystal report in wpf browser application . I add the following dlls in refenrence :

  **SapBusinessObjects.WPf.Viewer
  SapBusinessObjects.WPf.ViewerShared**

And the xaml file is this :

     <UserControl x:Class="Report_UC"
         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
         xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
          xmlns:my="clr-namespace:SAPBusinessObjects.WPF.Viewer;assembly=SAPBusinessObjects.WPF.Viewer"
         mc:Ignorable="d" 
         d:DesignHeight="800" d:DesignWidth="800">
<Grid>
    <my:CrystalReportsViewer Name="report"></my:CrystalReportsViewer>

</Grid>
</UserControl>

I add this line to use crystal report viewer :

     xmlns:my="clr-namespace:SAPBusinessObjects.WPF.Viewer;assembly=SAPBusinessObjects.WPF.Viewer"

But when i press F5 to run the app it gives this error :

     The tag 'CrystalReportsViewer' does not exist in XML namespace 'clr-namespace:SAPBusinessObjects.WPF.Viewer;assembly=SAPBusinessObjects.WPF.Viewer'

where is the problem ??? i am stucked here till one day . Oh God ! Help Me .... Please Wot to do to use crystal report ??????

1

There are 1 best solutions below

0
On

Try this:

Right click on the project click on Properties.

Change the target framework .NET Framework 4 Client Profile to .NET Framework 4.

Most probably this may be working