Export-NAVAppReportLayout
Exports the specified custom report layout from a Business Central database to a file.
Syntax
Default (Default)
Export-NAVAppReportLayout
-LayoutCode <String[]>
[-Tenant <TenantId>]
[-ServerInstance] <String>
-Path <String>
[-PassThru]
[-Force]
[-ProgressAction <ActionPreference>]
[<CommonParameters>]
Description
Use the Export-NAVAppReportLayout cmdlet to export a custom report layout from a Business Central database to a file.
Examples
Example 1
Export-NAVAppReportLayout -ServerInstance BC -Path .\ReportLayout.layoutdata -LayoutCode MS-1016-DEFAULT
This example exports the report layout with the code 'MS-1016-DEFAULT' in the database that is used by the BC server instance to the ReportLayout.layoutdata file.
Example 2
Export-NAVAppReportLayout -ServerInstance BC -Path .\ReportLayout.layoutdata -LayoutCode MS-1016-DEFAULT -PassThru
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 11/25/2017 11:47 AM 450 ReportLayout.xml
Description
This example exports the report layout with the code 'MS-1016-DEFAULT' in the database that is used by the BC server instance to the ReportLayout.layoutdata file, then returns the location of the file.
Parameters
-Force
Forces the command to run without asking for user confirmation to overwrite an existing report layout file at the given path.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-LayoutCode
Specifies the Code of the report layout that will be exported.
Parameter properties
| Type: | String[] |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | False |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
-PassThru
Returns the path to the report layout file.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-Path
Specifies the name and location of the file that the report layout is exported to.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | False |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
-ProgressAction
A common PowerShell parameter that determines how PowerShell responds to progress updates generated by a script, cmdlet, or provider. Learn more.
Parameter properties
| Type: | ActionPreference |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | proga |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-ServerInstance
Specifies the Business Central Server instance that the report layout will be exported from, such as BC.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | 0 |
| Mandatory: | True |
| Value from pipeline: | True |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
-Tenant
Specifies the tenant from which to export data. If the server instance is configured for single tenant, do not set the parameter.
Parameter properties
| Type: | TenantId |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
System.String
By property name: LayoutCode
Microsoft.Dynamics.Nav.Types.TenantId
By property name: Tenant
System.String
By value and by property name: ServerInstance
System.String
By property name: Path