Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

Custom Report Layout Table Locking

Posted on by 372

Hello,

To often we get the error message that the custom report layout table is locked. We do not have access to system tables in the DB to SQL access whose locking it. What im really trying to find out is what actually locks this table?

Noone is editing a report.

  • Suggested answer
    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans