2
When a report has no layout (typically if you create a report with a Word layout and you miss to set DefaultLayout = Word), then BC online returns a generic error page telling that an error occured...

On-premise, the Windows event log gives a bit more info (see below).
Could you improve the error message in the client so it can also be understandable in BC online?


Windows event log:

Tenant ID:
Environment Name:
Environment Type:
User:
Type: System.ArgumentNullException
Message:
Value cannot be null.
Parameter name: reportLayout
ParamName: reportLayout
StackTrace:
at Microsoft.Dynamics.Nav.Types.Report.Runtime.LocalReportHandle..ctor(Int32 reportId, Byte[] reportLayout, Boolean enableExternalImages, Boolean enableHyperlinks, Boolean enableExternalAssemblies, Boolean enableReportViewerInternalAppDomainIsolation, Boolean enableAppDomainMonitor)
at Microsoft.Dynamics.Nav.Runtime.NavSession.<>c__DisplayClass190_0.b__0(MetaReport metaReport)
at Microsoft.Dynamics.Nav.Runtime.LocalReportCache.GetLocalReport(MetaReport metaReport)
at Microsoft.Dynamics.Nav.Runtime.NavReport.EffectiveLocalReportHandle()
at Microsoft.Dynamics.Nav.Runtime.ReportSaveAsRenderer.Start()
at Microsoft.Dynamics.Nav.Runtime.DataItemIterator.b__64_0()
at Microsoft.Dynamics.Nav.Runtime.DataItemIterator.ExecuteDataItemIterator(NavSqlConnectionIntent connectionIntent)
at Microsoft.Dynamics.Nav.Runtime.NavReport.<>c__DisplayClass154_0.b__0()
at Microsoft.Dynamics.Nav.Runtime.ApplicationObjectRootScope.AddApplicationObjectRootScope[T](NavApplicationObjectBase applicationObject, Func`1 action)
at Microsoft.Dynamics.Nav.Runtime.NavReport.RunReportInternal(NavRecord record, Boolean displayResult, ReportRunOptions reportRunOptions, Nullable`1 formResult)
at Microsoft.Dynamics.Nav.Runtime.NavReport.RunReport(NavRecord record, ReportRunOptions reportRunOptions, Nullable`1 formResult)
at Microsoft.Dynamics.Nav.Runtime.NavReport.RunReport(Nullable`1 requestWindow, Nullable`1 systemPrinter, NavRecord record, ReportRunMode mode, String printerName)
at Microsoft.Dynamics.Nav.Runtime.NavReport.RunReport(Int32 reportId, Nullable`1 requestWindow, Nullable`1 systemPrinter, NavRecord record, ReportRunMode runMode)
at Microsoft.Dynamics.Nav.Runtime.NavReport.Run(Int32 reportId)
at Microsoft.Dynamics.Nav.Service.NSService.RunReport(ApplicationMethodRequest applicationMethodRequest)
at SyncInvokeRunReport(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.RunInTransactionCombinator(ServiceOperation innerOperation, NSServiceBase serviceInstance, MethodBase syncMethod, Object[] inputs, Object[]& outputs)
at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.<>c__DisplayClass28_1.b__1(NSServiceBase serviceInstance, Object[] inputs, Object[]& outputs)
at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.TransientErrorRetryCombinator(ServiceOperation innerOperation, NSServiceBase serviceInstance, MethodBase syncMethod, Object[] inputs, Object[]& outputs)
at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.<>c__DisplayClass28_1.b__1(NSServiceBase serviceInstance, Object[] inputs, Object[]& outputs)
at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.ErrorMappingCombinator(ServiceOperation innerOperation, NSServiceBase serviceInstance, MethodBase syncMethod, Object[] inputs, Object[]& outputs)
Source: Microsoft.Dynamics.Nav.Types.Report.Runtime
HResult: -2147467261
StackTrace:
at Microsoft.Dynamics.Nav.Types.Report.Runtime.LocalReportHandle..ctor(Int32 reportId, Byte[] reportLayout, Boolean enableExternalImages, Boolean enableHyperlinks, Boolean enableExternalAssemblies, Boolean enableReportViewerInternalAppDomainIsolation, Boolean enableAppDomainMonitor)
at Microsoft.Dynamics.Nav.Runtime.NavSession.<>c__DisplayClass190_0.b__0(MetaReport metaReport)
at Microsoft.Dynamics.Nav.Runtime.LocalReportCache.GetLocalReport(MetaReport metaReport)
at Microsoft.Dynamics.Nav.Runtime.NavReport.EffectiveLocalReportHandle()
at Microsoft.Dynamics.Nav.Runtime.ReportSaveAsRenderer.Start()
at Microsoft.Dynamics.Nav.Runtime.DataItemIterator.b__64_0()
at Microsoft.Dynamics.Nav.Runtime.DataItemIterator.ExecuteDataItemIterator(NavSqlConnectionIntent connectionIntent)
at Microsoft.Dynamics.Nav.Runtime.NavReport.<>c__DisplayClass154_0.b__0()
at Microsoft.Dynamics.Nav.Runtime.ApplicationObjectRootScope.AddApplicationObjectRootScope[T](NavApplicationObjectBase applicationObject, Func`1 action)
at Microsoft.Dynamics.Nav.Runtime.NavReport.RunReportInternal(NavRecord record, Boolean displayResult, ReportRunOptions reportRunOptions, Nullable`1 formResult)
at Microsoft.Dynamics.Nav.Runtime.NavReport.RunReport(NavRecord record, ReportRunOptions reportRunOptions, Nullable`1 formResult)
at Microsoft.Dynamics.Nav.Runtime.NavReport.RunReport(Nullable`1 requestWindow, Nullable`1 systemPrinter, NavRecord record, ReportRunMode mode, String printerName)
at Microsoft.Dynamics.Nav.Runtime.NavReport.RunReport(Int32 reportId, Nullable`1 requestWindow, Nullable`1 systemPrinter, NavRecord record, ReportRunMode runMode)
at Microsoft.Dynamics.Nav.Runtime.NavReport.Run(Int32 reportId)
at Microsoft.Dynamics.Nav.Service.NSService.RunReport(ApplicationMethodRequest applicationMethodRequest)
at SyncInvokeRunReport(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.RunInTransactionCombinator(ServiceOperation innerOperation, NSServiceBase serviceInstance, MethodBase syncMethod, Object[] inputs, Object[]& outputs)
at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.<>c__DisplayClass28_1.b__1(NSServiceBase serviceInstance, Object[] inputs, Object[]& outputs)
at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.TransientErrorRetryCombinator(ServiceOperation innerOperation, NSServiceBase serviceInstance, MethodBase syncMethod, Object[] inputs, Object[]& outputs)
at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.<>c__DisplayClass28_1.b__1(NSServiceBase serviceInstance, Object[] inputs, Object[]& outputs)
at Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.ErrorMappingCombinator(ServiceOperation innerOperation, NSServiceBase serviceInstance, MethodBase syncMethod, Object[] inputs, Object[]& outputs)
Category: Development
STATUS DETAILS
Completed
Ideas Administrator

Thank you for your feedback. We fixed this in version 19.x of Business Central and it will be available in the next upcoming cummulative update.


Sincerely,

Kennie Nybo Pontoppidan

PM, Microsoft