편집

다음을 통해 공유


DefaultLayout Property

Version: Available or changed with runtime version 1.0.

Specifies whether the report uses the built-in RDL or Word report layout by default.

Applies to

  • Report

Property value

Value Available or changed with Description
RDLC runtime version 1.0 Specifies the built-in RDL layout as the default layout.
Word runtime version 1.0 Specifies the built-in Word layout as the default layout.
Excel runtime version 9.0 Specifies the built-in Excel layout as the default layout.

Syntax

report 50124 MyExcelReport
{
    DefaultLayout = Excel;

    // more report code here
}

Allowed values are defined in the option type DefaultLayout.

Remarks

A report object can include a built-in layout of either an Excel type, Word type, or RDL type. When you set the property to a type, then that layout type is used by default to view, save, and print a report. Users can change a report to use another layout from the Dynamics 365 Business Central client.

Warning

Using the report properties DefaultLayout, ExcelLayout, RDLCLayout, and WordLayout should be avoided as these properties will be deprecated in a later release. Instead, it's recommended to use the property DefaultRenderingLayout together with the new rendering syntax introduced in runtime version 9.0.

In Visual Studio Code, when hovering over any line with the ExcelLayout, RDLLayout, or WordLayout property, you can use the code action Convert to 'Rendering' to convert to the new rendering syntax.

For more information, see DefaultRenderingLayout Property.

The use of any of these report properties impact performance as every call loads the full layout in memory even if the intent is only to check if a given report had a layout of the given type.

Developing reports
Defining multiple report layouts
Creating an RDL Layout Report
Creating an Excel layout report
Creating a Word Layout Report