Dear all,
I am using NAV 2013 Build 36076.
When I print my customized report, NAV has stopped working.
When I try to print the same document again, this issue did not happen.
Do you have any idea to solve this issue? Thank you.
The event viewer said like below.
Type: System.DivideByZeroException
Message: Attempted to divide by zero.
StackTrace:
at Microsoft.Dynamics.Nav.Client.WinClient.ExceptionHandler.<>c__DisplayClass6.<DoRethrowWithCatchException>b__4()
at Microsoft.Dynamics.Nav.Client.WinClient.NavClientErrorHandler.ExecuteAndCatchExceptions(Func`1 execute)
at Microsoft.Dynamics.Nav.Client.WinClient.ExceptionHandler.DoExecute(Func`1 execute)
at Microsoft.Dynamics.Nav.Client.WinClient.ExceptionHandler.DoRethrowWithCatchException(Exception exception, Boolean designMode)
Source: Microsoft.Dynamics.Nav.Client.WinClient
HResult: -2147352558
----------------------------------
Type: System.DivideByZeroException
Message: Attempted to divide by zero.
StackTrace:
at System.Drawing.Printing.PageSettings.get_HardMarginX()
at Microsoft.Dynamics.Nav.Common.Printing.ReportRenderer.ReportPrintPage(Object sender, PrintPageEventArgs printPageEventArguments)
at System.Drawing.Printing.PrintDocument.OnPrintPage(PrintPageEventArgs e)
at System.Drawing.Printing.PrintDocument._OnPrintPage(PrintPageEventArgs e)
at System.Drawing.Printing.PrintController.PrintLoop(PrintDocument document)
at System.Drawing.Printing.PrintController.Print(PrintDocument document)
at System.Drawing.Printing.PrintDocument.Print()
at Microsoft.Dynamics.Nav.Common.Printing.ReportRenderer.PrintReport(Boolean showPrintStatus)
at Microsoft.Dynamics.Nav.Common.Printing.ReportRenderer.ReportPageReadyPrintDirectly(DataSetRequest reportRequest, Boolean isFirstPage, ReportExecutionHandler reportExecutionHandler)
at Microsoft.Dynamics.Nav.Common.Printing.ReportHandler.ReportPageReadyPrintDirectly(DataSetRequest reportRequest, ReportExecutionItem reportExecutionItem, Boolean isFirstPage, ReportExecutionHandler reportExecutionHandler)
at Microsoft.Dynamics.Nav.Common.Printing.ReportHandler.ReportPageReady(DataSetRequest reportRequest, ReportExecutionHandler reportExecutionHandler, IService service, IReportCallbackHandler reportCallbackHandler)
at Microsoft.Dynamics.Nav.Client.ServiceClientCallback.<>c__DisplayClass23.<ReportPageReady>b__22()
at Microsoft.Dynamics.Nav.Client.ServiceClientCallback.<>c__DisplayClass1.<RunClientRequest>b__0()
at Microsoft.Dynamics.Nav.Client.ServerInvocationManager.<>c__DisplayClass2.<WaitForServerResponse>b__0()
at Microsoft.Dynamics.Nav.Client.ServerInvocationManager.DoClientRequestAndCatch(Action clientRequest, Action`1 sendToServerIfNotFaulted)
at Microsoft.Dynamics.Nav.Client.ServerInvocationManager.WaitForServerResponse(IAsyncResult asyncResult, ThreadCallbackContext threadEventContext)
at Microsoft.Dynamics.Nav.Client.ServerInvocationManager.CallServer[T](CallServerMethod`1 callServerMethod, ServerCallOptions options)
at Microsoft.Dynamics.Nav.Client.ServerInvocationHandler.CallServer[T](CallServerMethod`1 callServerMethod, ServerCallOptions options)
at Microsoft.Dynamics.Nav.Client.ConnectionStateManager.CallServer[T](CallServerMethod`1 callServerMethod, ServerCallOptions options)
at Microsoft.Dynamics.Nav.Client.ConnectionStateManager.CallServer[T](CallServerMethod`1 callServerMethod)
at Microsoft.Dynamics.Nav.Client.ServerInvocationHandler.CallServer[T](CallServerMethod`1 callServerMethod)
at Microsoft.Dynamics.Nav.Client.ServiceConnection.CallServer[T](CallServerMethod`1 callServerMethod)
at Microsoft.Dynamics.Nav.Client.ServiceConnectionBase.ActionField(NavRecordState& state, NavDataSet recDataSet, Int32 controlId)
at Microsoft.Dynamics.Nav.Client.ServiceConnection.Microsoft.Dynamics.Nav.Client.IService.ActionField(NavRecordState& , NavDataSet , Int32 )
at Microsoft.Dynamics.Nav.Client.DataBinder.NstDataAccess.ActionMethod(Int32 controlId)
at Microsoft.Dynamics.Nav.Client.Actions.InvokePageTriggerAction.InvokeTrigger(LogicalControl logicalControl, UISession uiSession)
at Microsoft.Dynamics.Nav.Client.Actions.InvokePageTriggerAction.InvokeCore(Boolean async, LogicalControl logicalControl, Object state, UISession uiSession)
at Microsoft.Dynamics.Framework.UI.LogicalAction.InvokeCoreWithErrorHandling(Boolean async, LogicalControl logicalControl, Object state, UISession uiSession)
at Microsoft.Dynamics.Framework.UI.LogicalAction.DoInvoke(LogicalControl logicalControl, UISession uiSession)
at Microsoft.Dynamics.Framework.UI.ActionControl.Invoke()
at Microsoft.Dynamics.Framework.UI.Windows.ActionsHelper.<>c__DisplayClassa.<ModalitySafeInvoke>b__8()
at Microsoft.Dynamics.Framework.UI.Windows.ActionsHelper.ModalitySafe(Action action)
at Microsoft.Dynamics.Framework.UI.Windows.ActionsHelper.ModalitySafeInvoke(ActionControl actionControl)
at Microsoft.Dynamics.Framework.UI.Windows.ActionControlAdapterBase.DefaultInvokeAction(LogicalControlAdapter adapter, ActionControl actionControl)
at Microsoft.Dynamics.Framework.UI.WinForms.ProcessShortcutHelper.ProcessShortcutKeyInActionControl(ActionControl control)
at Microsoft.Dynamics.Framework.UI.WinForms.ProcessShortcutHelper.ProcessShortcutKey(LogicalControl control)
at Microsoft.Dynamics.Framework.UI.WinForms.ProcessShortcutHelper.ProcessShortcutKeyInChildren(LogicalControl control)
at Microsoft.Dynamics.Framework.UI.WinForms.ProcessShortcutHelper.ProcessShortcutKey(LogicalControl control)
at Microsoft.Dynamics.Framework.UI.WinForms.ProcessShortcutHelper.ProcessShortcutKeyInChildren(LogicalControl control)
at Microsoft.Dynamics.Framework.UI.WinForms.ProcessShortcutHelper.ProcessShortcutKey(LogicalControl control)
at Microsoft.Dynamics.Framework.UI.WinForms.ProcessShortcutHelper.ProcessShortcutKeyInChildren(LogicalControl control)
at Microsoft.Dynamics.Framework.UI.WinForms.ProcessShortcutHelper.ProcessShortcutKey(LogicalControl control)
at Microsoft.Dynamics.Framework.UI.WinForms.ProcessShortcutHelper.ProcessShortcutKeyInChildren(LogicalControl control)
at Microsoft.Dynamics.Framework.UI.WinForms.ProcessShortcutHelper.ProcessShortcutKeyAll(LogicalControl control)
at Microsoft.Dynamics.Framework.UI.WinForms.ProcessShortcutHelper.ProcessShortcutKeyInLogicalControlsFromCurrentControl(Boolean execute)
at Microsoft.Dynamics.Framework.UI.WinForms.LogicalFormAdapter.ProcessKey(Keys keyData)
at Microsoft.Dynamics.Framework.UI.WinForms.LogicalFormAdapter.BusinessForm_PreviewProcessCmdKey(Object sender, HandledPreviewKeyDownEventArgs e)
at Microsoft.Dynamics.Framework.UI.WinForms.Controls.BusinessForm.OnPreviewProcessCmdKey(HandledPreviewKeyDownEventArgs e)
at Microsoft.Dynamics.Framework.UI.WinForms.Controls.BusinessForm.ProcessCmdKey(Message& msg, Keys keyData)
at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
at Microsoft.Dynamics.Framework.UI.WinForms.Controls.DirectionalLayoutPanel.ProcessCmdKey(Message& msg, Keys keyData)
at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
at Microsoft.Dynamics.Framework.UI.WinForms.Controls.DirectionalLayoutPanel.ProcessCmdKey(Message& msg, Keys keyData)
at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
at Microsoft.Dynamics.Framework.UI.WinForms.Controls.DirectionalLayoutPanel.ProcessCmdKey(Message& msg, Keys keyData)
at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
at Microsoft.Dynamics.Framework.UI.WinForms.Controls.DirectionalLayoutPanel.ProcessCmdKey(Message& msg, Keys keyData)
at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
at Microsoft.Dynamics.Framework.UI.WinForms.Controls.DirectionalLayoutPanel.ProcessCmdKey(Message& msg, Keys keyData)
at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
at Microsoft.Dynamics.Framework.UI.WinForms.Controls.BusinessGridView.ProcessCmdKey(Message& msg, Keys keyData)
at System.Windows.Forms.Control.PreProcessMessage(Message& msg)
at System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg)
at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)
Source: System.Drawing
HResult: -2147352558
*This post is locked for comments