IncludeCaption on Report for fields from Table Extension
Dear All,
When I want to add to the report field which was previously added via Table Extension and want to set IncludeCaption = true I have the below error.
I am using NAV 2018 CU8 and AL as below:
`Microsoft (R) AL Compiler version 0.12.28462 Copyright (C) Microsoft Corporation. All rights reserved
[Error - 22:29:49] Please report this issue to https://github.com/microsoft/al/issues including information on how to reproduce it, if possible.Details:
System.InvalidCastException: Unable to cast object of type 'Microsoft.Dynamics.Nav.CodeAnalysis.SourceTableExtensionTypeSymbol' to type 'Microsoft.Dynamics.Nav.CodeAnalysis.Symbols.TableTypeSymbol'.
at Microsoft.Dynamics.Nav.CodeAnalysis.Emit.ReportMetadataEmitter.<>c__DisplayClass15_1.1.EmitMetadata(Action1 content) in C:\a\316\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Emitter\GenericObjectMetadataEmitter.cs:line 37
at Microsoft.Dynamics.Nav.CodeAnalysis.MethodCompiler.CompileObject(ObjectTypeSymbol containingType) in C:\a\316\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Compiler\MethodCompiler.cs:line 248
at Microsoft.Dynamics.Nav.CodeAnalysis.MethodCompiler.<>c__DisplayClass17_0.1 filterOpt, CancellationToken cancellationToken) in C:\a\316\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Compiler\MethodCompiler.cs:line 145
at Microsoft.Dynamics.Nav.CodeAnalysis.Compilation.CompileImpl(ModuleBuilder moduleBuilder, Boolean emittingPdb, DiagnosticBag diagnostics, Predicate1 filterOpt, CancellationToken cancellationToken) in C:\a\316\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Compilation\Compilation.cs:line 806
at Microsoft.Dynamics.Nav.CodeAnalysis.Compilation.Compile(ModuleBuilder moduleBuilder, Boolean emittingPdb, DiagnosticBag diagnostics, Predicate1 filterOpt, CancellationToken cancellationToken) in C:\a\316\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Compilation\Compilation.cs:line 783
at Microsoft.Dynamics.Nav.CodeAnalysis.CommandLine.CommonCompiler.PackageTheModule(Compilation compilation, CompilerTextWriter consoleOutput, CancellationToken cancellationToken, ErrorLogger errorLogger, AnalyzerDriver analyzerDriver) in C:\a\316\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\CommandLine\CommonCompiler.cs:line 531
at Microsoft.Dynamics.Nav.CodeAnalysis.CommandLine.CommonCompiler.RunCore(CompilerTextWriter consoleOutput, ErrorLogger errorLogger, CancellationToken cancellationToken) in C:\a\316\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\CommandLine\CommonCompiler.cs:line 413
at Microsoft.Dynamics.Nav.CodeAnalysis.CommandLine.CommonCompiler.Run(CompilerTextWriter consoleOutput, CancellationToken cancellationToken) in C:\a\316\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\CommandLine\CommonCompiler.cs:line 312
at Microsoft.Dynamics.Nav.EditorServices.Protocol.LanguageServer.Extensions.CreatePackageRequestHandler.<HandleAsync>d__3.MoveNext() in C:\a\316\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\LanguageServer\Extensions\CreatePackageRequestHandler.cs:line 32
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Dynamics.Nav.EditorServices.Protocol.RequestRegistry.<Process>d__6.MoveNext() in C:\a\316\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\Endpoints\RequestRegistry.cs:line 59
Hi @mynavblog, can you try using the latest extension from the VS Code marketplace (version 0.16.19969) to see if it still reproduces there? Can you also provide us with a short code snippet that would reproduce this error?
Hi, Just checked the newest version. The same code works as expected. So I think the issue can be close.
However will it be also fixed for Dynamics NAV 2018? Or it means that only for BC it will work?
Best regards, Kris
Hi @mynavblog, we are by default not backporting bug fixes to NAV 2018. You can read more about our process in regards to NAV 2018 in these two links: https://github.com/Microsoft/AL/wiki/Frequently-Asked-Questions#i-found-an-issue-on-nav-2018-what-do-i-do https://blogs.msdn.microsoft.com/nav/2018/05/03/al-developer-previews-multiple-releases-and-github/