This is a migrated thread and some comments may be shown as answers.

can't display reportViewer in my current projects, urgent help needed

4 Answers 189 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Tai
Top achievements
Rank 1
Tai asked on 08 Jan 2011, 12:50 AM
Hi

right now for my current project, whenever i create a new reportViewer to show my report and i always get the error message:
XamlParseException Occurred
Failed to assign to property 'System.Windows.ResourceDictionary.Source'. [Line: 5 Position: 36]

Note that i have just updated to the Q3 for my report(before updating i even get the error message in the design mode, however by using Upgrade Wizard to update to Q3 the error at design mode is gone). Right now only at runtime . And my silverlight control is using the latest Q3 too

My reporting version is 4.2.10.1221
my silverlight control version is 2010.3.1110.1040




I ABSOLUTELY have no idea what is going on. For my current project, i try to create a NEW simple page which only contains ReportViewer control (nothing special, no source supply too). And try to test it but still get the error
However, if i create a NEW PROJECT, with the same simple page which contains the ReportViewer only , then everything runs fine.
So i think there must have some compatible issue here.

I tried to clean the solution and rebuild it but no luck too


this is the stack trace:
System.Windows.Markup.XamlParseException occurred
  Message=Set property 'System.Windows.FrameworkElement.Style' threw an exception. [Line: 14 Position: 41]
  LineNumber=14
  LinePosition=41
  StackTrace:
       at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
       at SilverFinancials.WindowsReport.FinancialAccountReport.InitializeComponent()
       at SilverFinancials.WindowsReport.FinancialAccountReport..ctor()
  InnerException: System.Windows.Markup.XamlParseException
       Message=Failed to assign to property 'System.Windows.ResourceDictionary.Source'. [Line: 5 Position: 36]
       LineNumber=5
       LinePosition=36
       StackTrace:
            at MS.Internal.XcpImports.CreateFromXaml(UnmanagedMemoryStream stream, String sourceAssemblyName, Boolean createNamescope, Boolean requireDefaultNamespace, Boolean allowEventHandlers)
            at System.Windows.Controls.Control.GetBuiltInStyle(IntPtr nativeTarget, IntPtr& nativeStyle)
       InnerException: System.Collections.Generic.KeyNotFoundException
            Message=The given key was not present in the dictionary.
            StackTrace:
                 at System.ThrowHelper.ThrowKeyNotFoundException()
                 at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
                 at System.Windows.ResourceManagerWrapper.GetResourceForUri(Uri xamlUri, Type componentType)
            InnerException: 


My xaml. It is very simple. A RadWindow contains the reportviewer . The window will be popped up through the clicked event of the menuItem in the RadRibbonbar.
<telerik:RadWindow x:Class="SilverFinancials.WindowsReport.CheckReport"
                    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                   xmlns:telerikReport="clr-namespace:Telerik.ReportViewer.Silverlight;assembly=Telerik.ReportViewer.Silverlight"
    mc:Ignorable="d"
                   Closed="Check_Print_Closed"
                   Header="Check Print"
    d:DesignHeight="300" d:DesignWidth="400" Width="970" Height="600">
     
    <Grid x:Name="LayoutRoot" Background="White">
        
            <telerikReport:ReportViewer  Name="checkReport" Width="970" Height="600"
 >
            </telerikReport:ReportViewer>
         
        
    </Grid>
</telerik:RadWindow>

Code behind
using SilverFinancials.Windows.Accounts_Payable.Posting;
using Telerik.Windows.Controls;
 
namespace SilverFinancials.WindowsReport
{
    public partial class CheckReport : RadWindow
    {
        
        public CheckReport()
        {
            InitializeComponent();
            }
             
             
     
    }
}



plz help me

4 Answers, 1 is accepted

Sort by
0
Tai
Top achievements
Rank 1
answered on 10 Jan 2011, 08:01 PM
can someone help me? right now all of my Silverlight window which contains the reportviewer can't run at all

0
Jules
Top achievements
Rank 1
answered on 10 Jan 2011, 11:05 PM
I'm getting the same error and would be interested in knowing how this gets solved. For me this is with a clean project -- single report newly created and a new (blank) WPF project with a single form showing only the ReportViewer. 

Jules
0
Tai
Top achievements
Rank 1
answered on 12 Jan 2011, 09:31 AM
can anyone at telerik help me with this? i need to do a demo to my client soon

thank you
0
Tai
Top achievements
Rank 1
answered on 13 Jan 2011, 12:39 AM
not sure why it runs fine today. I don't change any dll
but anyway. Everything is fine now
Tags
General Discussions
Asked by
Tai
Top achievements
Rank 1
Answers by
Tai
Top achievements
Rank 1
Jules
Top achievements
Rank 1
Share this question
or