Business Logic

Business Logic

The Multiple Layout Selector will use a specific logic for determining which layout it will use to render the reports.

The selector checks the following, in this order, and uses the first one that applies:

  1. Entries in the Red Report Layout Selection table for the report and the table of the printed record whose field value matches the record. Only entries with the usage of the printed document or the usage Red Blank (any usage) apply. If one entry matches, its layout is used. If more than one entry matches, the user chooses which of these layouts to use.
  2. An entry marked as default for the report. A default entry with the usage of the printed document is used before a default entry with the usage Red Blank. When no layout is selected on the default entry, the default layout of the report in Business Central is used.
  3. All layouts of the report. If the report has one layout, that layout is used. If it has more than one, the user chooses which layout to use. If it has none, Dynamics 365 Business Central prints the report as usual.

When the report is printed without a user interface, for example from a job queue, the first layout is used instead of asking the user.

The list of layouts to choose from contains both the layouts you created (limited to the current company or available in all companies) and the built-in layouts that come with the report, for example the Word and RDLC layouts of the Standard Sales Invoice. Email body layouts are not shown. The same list is used when you look up a layout in the Red Report Layout Selection, so you can also select a built-in layout there.

Warehouse documents

Warehouse documents that are printed through the Report Selection - Warehouse, such as picks, put-aways, movements, inventory picks and put-aways, warehouse receipts and shipments, and posted warehouse receipts and shipments, use the same logic. Warehouse documents have their own usages that are not available in the Red Report Layout Selection, so only entries with the usage Red Blank (any usage) apply to them.