When I introduced the report execution flow, I mentioned that the application code determines which layout needs to be used when. This flow starts from codeunit 1, application management, and uses several other tables and codeunits. If you spend a little time investigating this codeunit, then you will discover how you can use it to your advantage when you are confronted with managing report layouts so that you don't reinvent the wheel.
In codeunit 1, application management, and in the
Custom Report Layout and
Report Layout Selection tables, you will find many functions for managing reports and report layouts.
In codeunit 1, application management, there's a
HasCustomLayout function, that determines if a report has a custom ...