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

Exception thrown in design mode

6 Answers 330 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jason
Top achievements
Rank 1
Jason asked on 02 Jun 2009, 04:43 AM
Hi,

I've just installed Telerik Report Q1 2009, and now I'm having this problem.

In visual studio, I added a new item of Telerik Report Q1 2009 in my project. I could see the auto-generated code in Code mode, but when I switched to the design mode, it threw an exception on the opened design mode page, which said: Object reference not set to an instance of and object. In addition, when I run the Telerik Reporting Q1 2009 Demo Application, click one of the nodes in the left tree,say, Sales Dashboard, an error window pop up showing:

Unhandled exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately.
Exception has been thrown by the target of an invocation.


When I clicked the "Details" button, it shows following details:
/*---------------------------------------------------------------------------------------------------------------------------------------------*/

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.ReportViewer.WinForms.WinViewer.UpdateScrollSize()
   at Telerik.ReportViewer.WinForms.WinViewer.OnSizeChanged(EventArgs eventArgs)
   at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight)
   at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height)
   at System.Windows.Forms.Control.SetBoundsCore(Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified)
   at System.Windows.Forms.Control.ScaleControl(SizeF factor, BoundsSpecified specified)
   at System.Windows.Forms.ScrollableControl.ScaleControl(SizeF factor, BoundsSpecified specified)
   at System.Windows.Forms.Control.ScaleControl(SizeF includedFactor, SizeF excludedFactor, Control requestingControl)
   at System.Windows.Forms.ContainerControl.Scale(SizeF includedFactor, SizeF excludedFactor, Control requestingControl)
   at System.Windows.Forms.ContainerControl.PerformAutoScale(Boolean includedBounds, Boolean excludedBounds)
   at System.Windows.Forms.ContainerControl.PerformNeededAutoScaleOnLayout()
   at System.Windows.Forms.ContainerControl.OnLayoutResuming(Boolean performLayout)
   at System.Windows.Forms.Control.ResumeLayout(Boolean performLayout)
   at Telerik.ReportViewer.WinForms.ReportViewerAreaBase.InitializeComponent()
   at Telerik.ReportViewer.WinForms.ReportViewerAreaBase..ctor()
   at Telerik.ReportViewer.WinForms.WinViewer..ctor()
   at Telerik.ReportViewer.WinForms.ReportViewer..ctor()
   at Telerik.Reporting.QuickStart.ReportViewerContainerControl.InitializeComponent()
   at Telerik.Reporting.QuickStart.ReportViewerContainerControl..ctor()
   --- End of inner exception stack trace ---
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)
   at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at System.Activator.CreateInstance(Type type)
   at Telerik.QuickStart.WinControls.MainForm.NavigateToExample(ExamplesTreeNode treeNode)
   at Telerik.QuickStart.WinControls.MainForm.treeView1_AfterSelect(Object sender, TreeViewEventArgs e)
   at System.Windows.Forms.TreeView.OnAfterSelect(TreeViewEventArgs e)
   at System.Windows.Forms.TreeView.TvnSelected(NMTREEVIEW* nmtv)
   at System.Windows.Forms.TreeView.WmNotify(Message& m)
   at System.Windows.Forms.TreeView.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///E:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
qsf
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///E:/Program%20Files/Telerik/Reporting%20Q1%202009/Examples/QuickStart/bin/qsf.exe
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///E:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
QuickStart
    Assembly Version: 2.5.1.0
    Win32 Version: 2.5.1.0
    CodeBase: file:///E:/Program%20Files/Telerik/Reporting%20Q1%202009/Examples/QuickStart/bin/QuickStart.DLL
----------------------------------------
Telerik.WinControls.UI
    Assembly Version: 2.5.1.0
    Win32 Version: 2.5.1.0
    CodeBase: file:///E:/Program%20Files/Telerik/Reporting%20Q1%202009/Examples/QuickStart/bin/Telerik.WinControls.UI.DLL
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///E:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///E:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
CSharp.ReportLibrary
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///E:/Program%20Files/Telerik/Reporting%20Q1%202009/Examples/QuickStart/bin/CSharp.ReportLibrary.DLL
----------------------------------------
Telerik.WinControls
    Assembly Version: 2.5.1.0
    Win32 Version: 2.5.1.0
    CodeBase: file:///E:/Program%20Files/Telerik/Reporting%20Q1%202009/Examples/QuickStart/bin/Telerik.WinControls.DLL
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///E:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///E:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Web
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///E:/WINDOWS/assembly/GAC_32/System.Web/2.0.0.0__b03f5f7f11d50a3a/System.Web.dll
----------------------------------------
System.Design
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///E:/WINDOWS/assembly/GAC_MSIL/System.Design/2.0.0.0__b03f5f7f11d50a3a/System.Design.dll
----------------------------------------
System.Data
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///E:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
Accessibility
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///E:/WINDOWS/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
Telerik.Reporting
    Assembly Version: 3.0.9.430
    Win32 Version: 3.0.9.430
    CodeBase: file:///E:/WINDOWS/assembly/GAC_MSIL/Telerik.Reporting/3.0.9.430__a9d7983dfcc261be/Telerik.Reporting.dll
----------------------------------------
System.Drawing.Design
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///E:/WINDOWS/assembly/GAC_MSIL/System.Drawing.Design/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.Design.dll
----------------------------------------
TelerikCommon
    Assembly Version: 2.5.1.0
    Win32 Version: 2.5.1.0
    CodeBase: file:///E:/Program%20Files/Telerik/Reporting%20Q1%202009/Examples/QuickStart/bin/TelerikCommon.DLL
----------------------------------------
Microsoft.mshtml
    Assembly Version: 7.0.3300.0
    Win32 Version: 7.0.3300.0
    CodeBase: file:///E:/WINDOWS/assembly/GAC/Microsoft.mshtml/7.0.3300.0__b03f5f7f11d50a3a/Microsoft.mshtml.dll
----------------------------------------
Telerik.ReportViewer.WinForms
    Assembly Version: 3.0.9.430
    Win32 Version: 3.0.9.430
    CodeBase: file:///E:/WINDOWS/assembly/GAC_MSIL/Telerik.ReportViewer.WinForms/3.0.9.430__a9d7983dfcc261be/Telerik.ReportViewer.WinForms.dll
----------------------------------------
Telerik.Reporting.Processing
    Assembly Version: 3.0.9.430
    Win32 Version: 3.0.9.430
    CodeBase: file:///E:/WINDOWS/assembly/GAC_MSIL/Telerik.Reporting.Processing/3.0.9.430__a9d7983dfcc261be/Telerik.Reporting.Processing.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

/*---------------------------------------------------------------------------------------------------------------------------------------------*/
My OS is windows XP professional SP3. But in my colleage's computer, which is Windows server 2003, there is no such problem.





6 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 02 Jun 2009, 08:14 AM
Hello Jason,

This is a known issue that slipped into the Q1 SP1 release, for which we sincerely apologize. The bug can occur when the current desktop DPI setting is different from 96 DPI (or you have a custom windows font set), and the ReportViewer tries to auto-scale itself accordingly. The issue has already been addressed and would be part of the subsequent Telerik Reporting release. As a temporary work-around you can reset your desktop DPI setting to 96 DPI (or return to default font).

Please, excuse us for the temporary inconvenience.

All the best,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Jason
Top achievements
Rank 1
answered on 03 Jun 2009, 09:08 AM
Hi Steve,
Thanks for your quick reply. However, after I checked my desktop setting, I found it was 96DPI. I have never changed anything about this and windows font set. So is it because of something else?
Thanks!
0
Steve
Telerik team
answered on 03 Jun 2009, 09:20 AM
Hi Jason,

As explained in my previous reply, the issue occurs with different windows fonts as well. So in your case, if your windows is localized (i.e. Chinese windows), then the font used is not the standard and the report viewer would always try to auto re-size, thus throw the error. Unfortunately in this case there is no workaround other then reverting back to v.Q1 2009 which does not exhibit this problem.

Please excuse us for the inconvenience.

Kind regards,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Jason
Top achievements
Rank 1
answered on 04 Jun 2009, 05:58 AM
Thanks Steve, yes, my OS is Chinese windows. But, one of my colleagues has installed in his computer, which is with Windows Server 2003, and the program runs fine. His OS is also Chinese windows.
0
Accepted
Steve
Telerik team
answered on 04 Jun 2009, 09:22 AM
Hello Jason,

Well, I guess the font of the windows 2003 server differs from the font of the Vista/XP windows. Either way there is no other workaround at the moment for localized windows except reverting back to the previous version (link is available in my previous post).
We have taken precautions from now on to test on localized and OS with different dpi to avoid such unpleasant problems in the future. As explained the issue is already fixed and would be part of the Q2 release expected in the end of June.

We sincerely apologize once again for the inconvenience caused.

Best wishes,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Jason
Top achievements
Rank 1
answered on 05 Jun 2009, 04:13 AM
Thanks, Steve. Now we just use the Q1 2009 version first, and everything is ok now.
Tags
General Discussions
Asked by
Jason
Top achievements
Rank 1
Answers by
Steve
Telerik team
Jason
Top achievements
Rank 1
Share this question
or