I'm getting:
System.Windows.Markup.XamlParseException occurred
HResult=-2146233087
Message='Initialization of 'Telerik.ReportViewer.Wpf.ReportViewer' threw an exception.' Line number '23' and line position '27'.
Source=PresentationFramework
LineNumber=23
LinePosition=27
StackTrace:
at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
at LawtimeMain.ReportWindow.InitializeComponent() in c:\source\VSApps\LawtimeMainWPF\LawtimeMain\LawtimeMain\ReportOptions\ReportWindow.xaml:line 1
at LawtimeMain.ReportWindow..ctor(String reportType, ParameterCollection pc) in c:\source\VSApps\LawtimeMainWPF\LawtimeMain\LawtimeMain\ReportOptions\ReportWindow.xaml.cs:line 20
InnerException: System.Xaml.XamlObjectWriterException
HResult=-2146233088
Message=Set property 'System.Windows.ResourceDictionary.Source' threw an exception.
Source=System.Xaml
LineNumber=0
LinePosition=0
StackTrace:
at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(Object inst, XamlMember property, Object value)
at MS.Internal.Xaml.Runtime.PartialTrustTolerantRuntime.SetValue(Object obj, XamlMember property, Object value)
at System.Xaml.XamlObjectWriter.Logic_ApplyPropertyValue(ObjectWriterContext ctx, XamlMember prop, Object value, Boolean onParent)
at System.Xaml.XamlObjectWriter.Logic_DoAssignmentToParentProperty(ObjectWriterContext ctx)
at System.Xaml.XamlObjectWriter.WriteEndMember()
at System.Xaml.XamlServices.Transform(XamlReader xamlReader, XamlWriter xamlWriter, Boolean closeWriter)
at System.Windows.SystemResources.ResourceDictionaries.LoadDictionary(Assembly assembly, String assemblyName, String resourceName, Boolean isTraceEnabled)
at System.Windows.SystemResources.ResourceDictionaries.LoadGenericDictionary(Boolean isTraceEnabled)
at System.Windows.SystemResources.FindDictionaryResource(Object key, Type typeKey, ResourceKey resourceKey, Boolean isTraceEnabled, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference, Boolean& canCache)
at System.Windows.SystemResources.FindResourceInternal(Object key, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference)
at System.Windows.StyleHelper.GetThemeStyle(FrameworkElement fe, FrameworkContentElement fce)
at System.Windows.FrameworkElement.UpdateThemeStyleProperty()
at System.Windows.FrameworkElement.OnInitialized(EventArgs e)
at MS.Internal.Xaml.Runtime.ClrObjectRuntime.InitializationGuard(XamlType xamlType, Object obj, Boolean begin)
InnerException: System.Windows.Markup.XamlParseException
HResult=-2146233087
Message=Set property 'System.Windows.ResourceDictionary.DeferrableContent' threw an exception.
Source=PresentationFramework
LineNumber=0
LinePosition=0
StackTrace:
at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
at System.Windows.Application.LoadBamlStreamWithSyncInfo(Stream stream, ParserContext pc)
at MS.Internal.AppModel.AppModelKnownContentFactory.BamlConverter(Stream stream, Uri baseUri, Boolean canUseTopLevelBrowser, Boolean sandboxExternalContent, Boolean allowAsync, Boolean isJournalNavigation, XamlReader& asyncObjectConverter)
at System.Windows.ResourceDictionary.set_Source(Uri value)
at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(Object inst, XamlMember property, Object value)
InnerException: System.NotImplementedException
HResult=-2147467263
Message=The method or operation is not implemented.
Source=PresentationFramework
StackTrace:
at System.Windows.Baml2006.Baml2006SchemaContext.ResolveBamlType(BamlType bamlType, Int16 typeId)
at System.Windows.Baml2006.Baml2006SchemaContext.GetXamlType(Int16 typeId)
at System.Windows.Baml2006.Baml2006Reader.Process_PropertyTypeReference()
at System.Windows.Baml2006.Baml2006Reader.Process_OneBamlRecord()
at System.Windows.Baml2006.Baml2006Reader.ReadKeys()
at System.Windows.ResourceDictionary.SetDeferrableContent(DeferrableContent deferrableContent)
at System.Windows.Baml2006.WpfSharedBamlSchemaContext.<Create_BamlProperty_ResourceDictionary_DeferrableContent>b__168(Object target, Object value)
at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(Object inst, XamlMember property, Object value)
InnerException:
21 Answers, 1 is accepted
At runtime I am getting the following exception:'Initialization of 'Telerik.ReportViewer.Wpf.ReportViewer' threw an exception.' Line number '59' and line position '53'.
And : Set property 'System.Windows.ResourceDictionary.Source' threw an exception.
at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(Object inst, XamlMember property, Object value)
at MS.Internal.Xaml.Runtime.PartialTrustTolerantRuntime.SetValue(Object obj, XamlMember property, Object value)
at System.Xaml.XamlObjectWriter.SetValue(Object inst, XamlMember property, Object value)
at System.Xaml.XamlObjectWriter.Logic_ApplyPropertyValue(ObjectWriterContext ctx, XamlMember prop, Object value, Boolean onParent)
at System.Xaml.XamlObjectWriter.Logic_DoAssignmentToParentProperty(ObjectWriterContext ctx)
at System.Xaml.XamlObjectWriter.Logic_AssignProvidedValue(ObjectWriterContext ctx)
at System.Xaml.XamlObjectWriter.WriteEndMember()
at System.Xaml.XamlWriter.WriteNode(XamlReader reader)
at System.Xaml.XamlServices.Transform(XamlReader xamlReader, XamlWriter xamlWriter, Boolean closeWriter)
at System.Xaml.XamlServices.Transform(XamlReader xamlReader, XamlWriter xamlWriter)
at System.Windows.SystemResources.ResourceDictionaries.LoadDictionary(Assembly assembly, String assemblyName, String resourceName, Boolean isTraceEnabled)
at System.Windows.SystemResources.ResourceDictionaries.LoadGenericDictionary(Boolean isTraceEnabled)
at System.Windows.SystemResources.FindDictionaryResource(Object key, Type typeKey, ResourceKey resourceKey, Boolean isTraceEnabled, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference, Boolean& canCache)
at System.Windows.SystemResources.FindResourceInternal(Object key, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference)
at System.Windows.SystemResources.FindResourceInternal(Object key)
at System.Windows.StyleHelper.GetThemeStyle(FrameworkElement fe, FrameworkContentElement fce)
at System.Windows.FrameworkElement.UpdateThemeStyleProperty()
at System.Windows.FrameworkElement.OnInitialized(EventArgs e)
at System.Windows.FrameworkElement.TryFireInitialized()
at System.Windows.FrameworkElement.EndInit()
at MS.Internal.Xaml.Runtime.ClrObjectRuntime.InitializationGuard(XamlType xamlType, Object obj, Boolean begin)
at System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri)
at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
at System.Windows.Application.LoadBamlStreamWithSyncInfo(Stream stream, ParserContext pc)
at System.Windows.Application.LoadComponent(Uri resourceLocator, Boolean bSkipJournaledProperties)
at System.Windows.Application.DoStartup()
at System.Windows.Application.<.ctor>b__1(Object unused)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.TranslateAndDispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.Run()
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run(Window window)
at System.Windows.Application.Run()
at OperationsDashboard.App.Main() in c:\Users\DVI0774\Documents\Visual Studio 2012\Projects\OperationsDashboard\OperationsDashboard\obj\x86\Debug\App.g.cs:line 0
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
We have an issue with an obsolete theme, part of the WPF controls suite. Next week we will release a new version using the latest version of the controls.
Please excuse us for the temporary inconvenience.
Regards,
Milen
the Telerik team
See what's new in Telerik Reporting Q1 2013. Register for the March 4 webinar to witness the impressive new visualizations in Telerik Reporting. Just for fun, 10 webinar attendees will be randomly selected to win a Telerik T-shirt and a $50 Gift Certificate to ThinkGeek. Register now! Seats are limited!
- Is there a way we can get notified when the patched version is available?
- When it does become available, how do we download it?
- Is this going to be an internal build or full release?
Thanks for your help with this.
This was annoying as I had previously tested the WPF Report Viewer example before updating to the new versions of the WPF Controls and Reporting, so was surprised when this didn't work in my project. On closer examination of the example found it was using the previous version of the WPF controls!!
Sorry again for the inconvenience. The internal build resolving the issue may be found in your accounts.
Kind regards,
Milen
the Telerik team
See what's new in Telerik Reporting Q1 2013. Register for the March 4 webinar to witness the impressive new visualizations in Telerik Reporting. Just for fun, 10 webinar attendees will be randomly selected to win a Telerik T-shirt and a $50 Gift Certificate to ThinkGeek. Register now! Seats are limited!
You can download an internal build from the Latest Internal Builds page. Also you can navigate to there from www.telerik.com -> Your Account -> Manage Products -> Latest Internal builds.
You should choose Reporting from the Product dropdown and 7.0. 13.220 from the version drop down. Once you did this you can download Telerik_Reporting_Q1_2013_build_7.0.13.228_DEV.msi, which at the moment is latest internal build.
Regards,
Milen
the Telerik team
See what's new in Telerik Reporting Q1 2013. Register for the March 4 webinar to witness the impressive new visualizations in Telerik Reporting. Just for fun, 10 webinar attendees will be randomly selected to win a Telerik T-shirt and a $50 Gift Certificate to ThinkGeek. Register now! Seats are limited!
To Telerik:
This is at least second serious issue in the last 6 months with Telerik Reporting. The first one was 100% failure of reports sent to print. No offence, but in my humble opinion your QA department could do a better job.
Does it mean Telerik.Reporting Q3 2012 can't work with the latest WPF RadControls?
Is there any workaround for this? does it help if we add our own styling?
My company has license to the latest WPF RadControls but not the Reporting...
Thanks
tungngie
Unfortunately you need Telerik Reporting Q1 2013 or later to incorporate with the latest Telerik WPF RadControls. In case you have DevCraft bundle, Telerik Reporting would be part of it. If you have purchased only our WPF controls, please contact our sales team (sales@telerik.com) to discuss the options.
If you need any further technical help, feel free to write us.
Regards,
Stef
Telerik
Have you tried the new visualization options in Telerik Reporting Q2 2013? You can get them from your account.
"Initialization of 'Telerik.ReportViewer.Wpf.ReportViewer' threw an exception" when loading the form that contains the report viewer. Here is the entire XAML for the form:
<
UserControl
x:Class
=
"FSLAGL.Views.ReportPreviewView"
xmlns:tr
=
"http://schemas.telerik.com/wpf"
mc:Ignorable
=
"d"
d:DesignHeight
=
"300"
d:DesignWidth
=
"300"
>
<
Grid
>
<
tr:ReportViewer
ReportSource
=
"{Binding Report}"
/>
</
Grid
>
</
UserControl
>
We are using Caliburm.Micro to bind the XAML views to the view model.
Here is the entire view model:
using
Caliburn.Micro;
using
Telerik.Reporting;
namespace
FSLAGL.ViewModels
{
public
class
ReportPreviewViewModel: Screen
{
public
ReportPreviewViewModel()
{
}
public
ReportSource Report {
get
;
set
; }
}
}
John
Please check the How to: Add report viewer to a WPF application help article, and add all required assemblies and namespaces.
Notice the WPF ReportViewer is built against the corresponding Telerik RadControls for WPF major version. If you use greater version of the WPF controls, you need binding redirects to run the application. In case you do not have the Telerik RadControls for WPF suite, you can use the provided with our local demos assemblies located under C:\Program Files (x86)\Telerik\Reporting <VERSION>\Examples\CSharp\WpfDemo.
If you need further help, please specify the used Telerik Reporting and Telerik RadControls for WPF assemblies version. Any additional details as the exception stack trace will be helpful.
Regards,
Stef
Telerik
Have you tried the new visualization options in Telerik Reporting Q2 2013? You can get them from your account.
You really need to update that page.
It fails to mention that you also need to add references for Telerik.Reporting and Telerik.ReportViewer.Wpf.
The section on the binding redirects also out of date.
Why are the binding redirects even needed?
Don't you just have to recompile the Reporting components against the latest WPF components?
Why can't you just keep the releases (ESPECIALLY the demos!) in sync?
This does not instill confidence in choosing your framework over your competition's.
John
All steps to add successfully a WPF ReportViewer control are listed in the How to: Add report viewer to a WPF application help article - the related RadControls for WPF assemblies, dragging the viewer will add the Telerik.ReportViewer.Wpf.dll and the Telerik.Reporting.dll is mentioned explicitly.
Generally, for each official Q release the WPF ReportViewer is built against the major RadControls for WPF version, unless there are changes requiring update. If in the same Q you want to upgrade your WPF controls, you need to apply binding redirects to the newer version of the WPF assemblies. This approach is more flexible than asking you to upgrade synchronously both products in the frame of a certain Q.
Binding redirects in our help article do not use exact version for the example, the purpose is to illustrate the configuration settings that have to be included - which assemblies and where to specify the greater version in use.
We consider adding more details to the article to avoid such misunderstandings in future. The changes will be included in the upcoming release. Feel free to send us any feedback on the matter if you have any further concerns.
Regards,
Stef
Telerik
New HTML5/JS REPORT VIEWER with MOBILE AND TOUCH SUPPORT available in Telerik Reporting Q3 2013! Get the new Reporting version from your account or download a trial.
The demo asked which components I wanted to try, I chose WPF and Reporting.
Adding the report viewer component to my form should have added ALL the necessary references to my project including any binding redirects.
The demo I downloaded for DevExpress did not have these issues - it just worked.
You may think that your approach works, but it just cost you two sales.
John
The WPFDemo is setup with the RadControls for WPF version used to build the ReportViewer and should be runnable without any additional settings.
If you use the WPF ReportViewer in your own project you are not obliged to purchase both products. We ship a trial version of the needed WPF assemblies, which can be obtained also by downloading the full RadControls for WPF trial suite. The WPF assemblies will be internally unlocked when used in the context of our WPF ReportViewer.
In case you use a DEV version of RadControls for WPF, you need Telerik Reporting of the same Q. And if the RadControls for WPF assemblies have greater version number than the one used to build the viewer, you will have to manually add the binding redirects as we cannot be aware of the WPF assemblies version you are targeting, especially if there are several different versions on the machine. Referencing the WPF assemblies is also manual for the same reason. Automating this process can lead to unwanted references or configuration settings.
The above details are listed in our How to: Add report viewer to a WPF application help article, which soon will be updated with more details to avoid such confusion in future.
Regards,
Stef
Telerik
New HTML5/JS REPORT VIEWER with MOBILE AND TOUCH SUPPORT available in Telerik Reporting Q3 2013! Get the new Reporting version from your account or download a trial.