RE: Custom Report Layout Table Locking
Hello,
It sounds like it could be this one which was fixed in CU6 for NAV 2017 (And same fix may apply to other versions too, I have not checked that):
https://support.microsoft.com/en-us/help/4021396/cumulative-update-06-for-microsoft-dynamics-nav-2017-build-16585
211666 |
The Update Layout function causes blocks when printing larger reports. |
Administration |
TAB 9650 |
To verify, you could update the application or on a copy, at least import latest version of table 9650 to test if latest application indeed will fix this. The change log for this is fairly simple - you can get it by exporting the table as txt from CU5 and CU6, then compare the two files:
Table 9650
New Global variable:
SkipModifyRec: Boolean;
Then use that here - just before calling the function UpdateLayout - 2 new lines:
IF (CustomLayoutCode <> '') AND GET(CustomLayoutCode) THEN BEGIN
TESTFIELD(Type,Type::RDLC);
SkipModifyRec := TRUE; // NEW LINE
IF UpdateLayout(TRUE,FALSE) THEN
COMMIT; // Save the updated layout
SkipModifyRec := FALSE; // NEW LINE
CALCFIELDS(Layout);
and, finally, later down in the table, add the condition:
IF TempBlob.Blob.HASVALUE THEN BEGIN
CLEAR(Layout);
Layout := TempBlob.Blob;
END;
IF NOT SkipModifyRec THEN // NEW LINE
MODIFY;
Of course I would always recommend to be on latest and greates versions both application and platform wise, but the steps above should help you verify if this is indeed where the problem is.