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

NRE in WPF ReportViewer

1 Answer 89 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
Patrick asked on 23 Jan 2017, 02:18 PM

Hello,

I have a window with the Telerik Report that is defined with:

<tkrep:ReportViewer Name="Viewer"
             ViewMode="PrintPreview"
             ZoomMode="FullPage" />

 

When the window is displayed, the application shows an error window with "Object reference not set to an instance of an object."

If I remove the ZoomMode="FullPage" attribute, the NRE is not displayed.

Note also that this was working correctly until I install version R1 2017 of Telerik Reporting.

If that could help you, here is the stack trace at the place the exception is generated:

     Telerik.ReportViewer.Wpf.dll!Telerik.ReportViewer.Wpf.ReportViewer.ApplyZoomMode() Line 698    C#
     Telerik.ReportViewer.Wpf.dll!Telerik.ReportViewer.Wpf.ReportViewer.OnZoomModePropertyChanged(System.Windows.DependencyObject d = {Telerik.ReportViewer.Wpf.ReportViewer}, System.Windows.DependencyPropertyChangedEventArgs e = {System.Windows.DependencyPropertyChangedEventArgs}) Line 654    C#
     WindowsBase.dll!System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs e)    Unknown
     PresentationFramework.dll!System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs e)    Unknown
     Telerik.ReportViewer.Wpf.dll!Telerik.ReportViewer.Wpf.ReportViewer.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs e = {System.Windows.DependencyPropertyChangedEventArgs}) Line 728    C#
     WindowsBase.dll!System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs args)    Unknown
     WindowsBase.dll!System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex entryIndex, System.Windows.DependencyProperty dp = {System.Windows.DependencyProperty}, System.Windows.PropertyMetadata metadata, System.Windows.EffectiveValueEntry oldEntry, ref System.Windows.EffectiveValueEntry newEntry = {System.Windows.EffectiveValueEntry}, bool coerceWithDeferredReference, bool coerceWithCurrentValue, System.Windows.OperationType operationType)    Unknown
     WindowsBase.dll!System.Windows.DependencyObject.SetValueCommon(System.Windows.DependencyProperty dp, object value, System.Windows.PropertyMetadata metadata, bool coerceWithDeferredReference, bool coerceWithCurrentValue, System.Windows.OperationType operationType, bool isInternal)    Unknown
     PresentationFramework.dll!System.Windows.Baml2006.WpfMemberInvoker.SetValue(object instance, object value)    Unknown
     System.Xaml.dll!MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(object inst, System.Xaml.XamlMember property = {System.Windows.Baml2006.WpfXamlMember}, object value)    Unknown
     System.Xaml.dll!MS.Internal.Xaml.Runtime.PartialTrustTolerantRuntime.SetValue(object obj = {Telerik.ReportViewer.Wpf.ReportViewer}, System.Xaml.XamlMember property = {System.Windows.Baml2006.WpfXamlMember}, object value = FullPage)    Unknown
     System.Xaml.dll!System.Xaml.XamlObjectWriter.Logic_ApplyPropertyValue(MS.Internal.Xaml.Context.ObjectWriterContext ctx = {MS.Internal.Xaml.Context.ObjectWriterContext}, System.Xaml.XamlMember prop = {System.Windows.Baml2006.WpfXamlMember}, object value = FullPage, bool onParent = true)    Unknown
     System.Xaml.dll!System.Xaml.XamlObjectWriter.Logic_DoAssignmentToParentProperty(MS.Internal.Xaml.Context.ObjectWriterContext ctx = {MS.Internal.Xaml.Context.ObjectWriterContext})    Unknown
     System.Xaml.dll!System.Xaml.XamlObjectWriter.WriteEndMember()    Unknown
     PresentationFramework.dll!System.Windows.Markup.WpfXamlLoader.TransformNodes(System.Xaml.XamlReader xamlReader = {System.Windows.Baml2006.Baml2006Reader}, System.Xaml.XamlObjectWriter xamlWriter = {System.Xaml.XamlObjectWriter}, bool onlyLoadOneNode = false, bool skipJournaledProperties = false, bool shouldPassLineNumberInfo = true, System.Xaml.IXamlLineInfo xamlLineInfo = {System.Windows.Baml2006.Baml2006Reader}, System.Xaml.IXamlLineInfoConsumer xamlLineInfoConsumer, MS.Internal.Xaml.Context.XamlContextStack<System.Windows.Markup.WpfXamlFrame> stack = {MS.Internal.Xaml.Context.XamlContextStack<System.Windows.Markup.WpfXamlFrame>}, System.Windows.Markup.IStyleConnector styleConnector = null)    Unknown
     PresentationFramework.dll!System.Windows.Markup.WpfXamlLoader.Load(System.Xaml.XamlReader xamlReader, System.Xaml.IXamlObjectWriterFactory writerFactory, bool skipJournaledProperties, object rootObject, System.Xaml.XamlObjectWriterSettings settings, System.Uri baseUri)    Unknown
     PresentationFramework.dll!System.Windows.Markup.WpfXamlLoader.LoadBaml(System.Xaml.XamlReader xamlReader = {System.Windows.Baml2006.Baml2006Reader}, bool skipJournaledProperties, object rootObject, System.Xaml.Permissions.XamlAccessLevel accessLevel, System.Uri baseUri)    Unknown
     PresentationFramework.dll!System.Windows.Markup.XamlReader.LoadBaml(System.IO.Stream stream = {MS.Internal.AppModel.BamlStream}, System.Windows.Markup.ParserContext parserContext = {System.Windows.Markup.ParserContext}, object parent, bool closeStream = true)    Unknown
     VIS.exe!PrintPreviewWnd.InitializeComponent() Line 1    Elements

1 Answer, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 23 Jan 2017, 05:16 PM
Hi Patrick,

Thank you for reporting the problem. The issue is related to the ZoomMode in combination with the preview mode of the viewer.

It is logged in our system for improvement and your Telerik points are updated to thank for bringing the issue to our attention.

Regards,
Stef
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Stef
Telerik team
Share this question
or