Page 1 of 1

Exception in "page size" in designer preview

Posted: Mon Sep 17, 2007 1:07 pm
by Fabio Pagano
Using released 2007.2 version for Vs2005.

If in designer preview i go in "page size" and the i click ok, i receive an exception.

Steps to reproduce the problem:

Create an application with the following code in Button1:

Code: Select all

Dim MyTable As New DataTable("MyTable")

        MyTable.Columns.Add("ID", GetType(Integer))

        MyTable.Rows.Add(1)
        MyTable.Rows.Add(2)

        Dim report As New Stimulsoft.Report.StiReport
        report.RegData("MyTable", MyTable)
        report.Design()
In designer, drag the table and choose the field "Id" (just to design something).

Click on tab "Preview".

In preview, click on "Page size" button and then click "OK".

An exception is thrown.

Note:
- The problem happens also if i change some setting (eg. Orientation)
- If i don't design any field, the problem disappears.
- I have had this problem in direct preview too.
- Actually all my installed printers are offline (so no printer communication)
- I have Italian settings (Language, Centimeters)

This is the exception trace stack:
System.NullReferenceException was unhandled
Message="Object reference not set to an instance of an object."
Source="Stimulsoft.Report"
StackTrace:
at Stimulsoft.Report.Components.StiPage.ResizePage(Double factorX, Double factorY)
at Stimulsoft.Report.Render.StiPreviewControl.OnClickPageSizeButton(Object sender)
at Stimulsoft.Report.Render.StiPreviewControl.InvokeClickPageSizeButton()
at Stimulsoft.Report.Render.StiPreviewControl.tbPageSize_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at Stimulsoft.Controls.StiToolButton.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at Stimulsoft.Controls.StiToolButton.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.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.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at System.Windows.Forms.Form.ShowDialog()
at Stimulsoft.Report.StiReport.StartDesigner(StiReport report, Form parentForm, Boolean dialogForm)
at Stimulsoft.Report.StiReport.Design()
at ViewerPageSetup.Form1.btnDesign_Click(Object sender, EventArgs e) in C:\StimulSoft\Problemi\OggettoNothingInCambioPaginaDaViewer\ViewerPageSetup\Form1.vb:line 18
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.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.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(ApplicationContext context)
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at ViewerPageSetup.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
at System.AppDomain.nExecuteAssembly(Assembly 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.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Thanks.

Exception in "page size" in designer preview

Posted: Tue Sep 18, 2007 9:47 am
by Edward
Thank you very much for this bug.

We will inform you in that topic when the solution be ready.

Thank you.

Exception in "page size" in designer preview

Posted: Wed Oct 17, 2007 12:41 pm
by Fabio Pagano
In 2007.10.10 build the problem seems solved.

Thanks.