# Report.DefaultLayout(Integer) Method
> Version: _Available or changed with runtime version 1.0 until version 14.0 where it was deprecated for the following reason: "Replace with layout selection and 'Report Layout List' lookup. See https://go.microsoft.com/fwlink/?linkid=2284102&clcid=0x409 for more information."_
Gets the default built-in layout type that is used on a specified report.
## Syntax
```al
DefaultLayout :=   Report.DefaultLayout(Number: Integer)
```
## Parameters
Number
Type: ../integer/integer-data-type
The ID of the report that you want to save. If the report that you specify does not exist, then a run-time error occurs.
## Return Value
DefaultLayout
Type: ../defaultlayout/defaultlayout-option
The default built-in layout type that is used on a specified report.
## Remarks
The default layout for a report is specified by the report's ../../properties/devenv-defaultlayout-property.
## Example (using `Report::<object identifier>` syntax)
As mentioned above, the Report.DefaultLayout method will throw a run-time error if no report with the supplied object ID exists. If you know the report object, a safe way to call Report.DefaultLayout is to use the `Report::<object identifier>` syntax as the compiler will tell you if Report1 doesn't exist.
```al
procedure MyProcKnownReport()
var
    layout: DefaultLayout;
begin
    // When you know the report object, this is safe
    // as the compiler will tell you if MyReport does not exist
    layout := Report.DefaultLayout(Report::MyReport);
end;
```
## Example (using a Try function)
As mentioned above, the Report.DefaultLayout method will throw a run-time error if no report with the supplied object ID exists. If you don't know the report object in your AL code, then you can wrap the Report.DefaultLayout method in a Try function as it doesn't write to the database.
```al
procedure GetLayout(ObjectId: Integer): DefaultLayout
var
    layout: DefaultLayout;
begin
    if not TryReportDefaultLayout(ObjectId) then begin
        // handle error here
    end
    else // now it's safe to call Report.DefaultLayout
        layout := Report.DefaultLayout(ObjectId);

    exit(layout);
end;

[TryFunction]
// Safe to wrap Report.DefaultLayout in a Try function
// as it doesn't write to the database
procedure TryReportDefaultLayout(ObjectId: Integer)
var
    layout: DefaultLayout;
begin
    layout := Report.DefaultLayout(ObjectId);
end;
```
## Related information
report-data-type
Get Started with AL<../../devenv-get-started>
Developing Extensions<../../devenv-dev-overview>

Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/report/report-defaultlayout-method, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact. https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/report/report-defaultlayout-method/
