Skip to content

Codeunit wDCR_SaveReport

Provides functions to save reports with a Document Creator Layout to a file in the specified output-format. You can use these functions to save reports to any output format included in enum <see cref="wDCR_OutputFileType" />, including output formats that are not supported by default in Microsoft Dynamics 365 Business Central.

Properties

Name Value
Access Public

Methods

wgFncConvertReportFormatToOutputFileType(ReportFormat):Enum::wDCR_OutputFileType

Converts the passed ReportFormat value to the corresponding wDCR_OutputFileType enum value.

Parameters

Type Name Description
ReportFormat pReportFormat The ReportFormat to convert.

Returns

Type Description
Enum wDCR_OutputFileType The corresponding wDCR_OutputFileType enum value.

wgFncSaveReportAs(Integer, Enum::wDCR_OutputFileType, OutStream@)

Runs a specific report with a Document Creator layout without a request page and saves the report in the specified output format to a stream.

Parameters

Type Name Description
Integer pReportID The ID of the report that you want to save.
Enum "wDCR_OutputFileType" pOutputFileType The output format of the report.
OutStream vOutStreamOutputDoc The OutStream to which the file is saved.

wgFncSaveReportAs(Integer, Text, Enum::wDCR_OutputFileType, OutStream@)

Runs a specific report with a Document Creator layout with specified request page parameters and saves the report in the specified output format to a stream.

Parameters

Type Name Description
Integer pReportID The ID of the report that you want to save.
Text pXmlParameters A string of request page parameters as XML to use to run the report.
Enum "wDCR_OutputFileType" pOutputFileType The output format of the report.
OutStream vOutStreamOutputDoc The OutStream to which the file is saved.

wgFncSaveReportAs(Integer, Text, Enum::wDCR_OutputFileType, Variant, OutStream@)

Runs a specific report with a Document Creator layout with specified request page parameters and record and saves the report in the specified output format to a stream.

Parameters

Type Name Description
Integer pReportID The ID of the report that you want to save.
Text pXmlParameters A string of request page parameters as XML to use to run the report.
Enum "wDCR_OutputFileType" pOutputFileType The output format of the report.
Variant pRecordVariant Specifies which record to use in the report.
OutStream vOutStreamOutputDoc The OutStream to which the file is saved.

wgFncSaveReportAs(Report Layout List, Text, Enum::wDCR_OutputFileType, Variant, OutStream@)

Runs a specific report with a Document Creator layout with specified request page parameters and record and saves the report in the specified output format to a stream.

Parameters

Type Name Description
Record "Report Layout List" pRecReportLayoutList The report layout to use.
Text pXmlParameters A string of request page parameters as XML to use to run the report.
Enum "wDCR_OutputFileType" pOutputFileType The output format of the report.
Variant pRecordVariant Specifies which record to use in the report.
OutStream vOutStreamOutputDoc The OutStream to which the file is saved.

wgFncSaveReportWithRequestPageAs(Integer, Enum::wDCR_OutputFileType):Boolean

Runs a specific report with a Document Creator layout with a request page and saves the report in the specified output format.

Parameters

Type Name Description
Integer pReportID The ID of the report that you want to save.
Enum "wDCR_OutputFileType" pOutputFileType The output format of the report.

Returns

Type Description
Boolean true iff successful

wgFncSaveReportWithRequestPageAs(Integer, Enum::wDCR_OutputFileType, OutStream@):Boolean

Runs a specific report with a Document Creator layout with a request page and saves the report in the specified output format to a stream.

Parameters

Type Name Description
Integer pReportID The ID of the report that you want to save.
Enum "wDCR_OutputFileType" pOutputFileType The output format of the report.
OutStream vOutStreamOutputDoc The OutStream to which the file is saved.

Returns

Type Description
Boolean true iff successful

wgFncSaveReportWithRequestPageAs(Report Layout List, Enum::wDCR_OutputFileType, OutStream@):Boolean

Runs a specific report with a Document Creator layout with a request page and saves the report in the specified output format to a stream.

Parameters

Type Name Description
Record "Report Layout List" pRecSelectedReportLayoutList The Report Layout to use.
Enum "wDCR_OutputFileType" pOutputFileType The output format of the report.
OutStream vOutStreamOutputDoc The OutStream to which the file is saved.

Returns

Type Description
Boolean true iff successful

wgFncSaveReportWithRequestPageAs(Report Layout List, Enum::wDCR_OutputFileType):Boolean

Runs a specific report with a Document Creator layout with a request page and saves the report in the specified output format to a stream.

Parameters

Type Name Description
Record "Report Layout List" pRecSelectedReportLayoutList The Report Layout to use.
Enum "wDCR_OutputFileType" pOutputFileType The output format of the report.

Returns

Type Description
Boolean true iff successful