---
id: object/codeunit/8800
type: object
title: Codeunit 8800 "Custom Layout Reporting"
summary: Codeunit 8800 "Custom Layout Reporting" in Base Application (Microsoft.Foundation.Reporting). 31 public procedures, 21 events. Present since at least BC23, still in BC30, changed in BC25, BC27.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: "27"
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 00ccf91d8cd2664af8ab4c5b5290844628e09fbceeb1ed2090a66b31f254f64c
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Foundation/Reporting/CustomLayoutReporting.Codeunit.al
    title: src/Layers/W1/BaseApp/Foundation/Reporting/CustomLayoutReporting.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 8800
name: Custom Layout Reporting
namespace: Microsoft.Foundation.Reporting
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "25"
  - "27"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 110
  events: 21
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 15
  called_by: 3
  implements: 0
---

# Codeunit 8800 "Custom Layout Reporting"

> Codeunit 8800 "Custom Layout Reporting" in Base Application (Microsoft.Foundation.Reporting). 31 public procedures, 21 events. Present since at least BC23, still in BC30, changed in BC25, BC27.

Base Application · Microsoft.Foundation.Reporting · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Foundation/Reporting/CustomLayoutReporting.Codeunit.al) · facts from BC29

## Events published

- `OnIsTestMode(var TestMode: Boolean)` (integration)
- `OnAfterProcessReport()` (integration)
- `OnBeforeCallReportSaveAs(ReportID: Integer; ReportFormatValue: ReportFormat)` (integration)
- `OnBeforePrintReport(var DataRecRef: RecordRef; ReportID: Integer)` (integration)
- `OnBeforeRunReport(var DataRecRef: RecordRef; var ReportSelections: Record "Report Selections"; var EmailPrintIfEmailIsMissing: Boolean; var TempBlobIndicesNameValueBuffer: Record "Name/Value Buffer" temporary; var TempBlobList: Codeunit "Temp Blob List"; var OutputType: Option; var AnyOutputExists: Boolean; var InHandled: Boolean)` (integration)
- `OnBeforeRunReportWithCustomReportSelection(var DataRecRef: RecordRef; var ReportID: Integer; var CustomReportSelection: Record "Custom Report Selection"; var EmailPrintIfEmailIsMissing: Boolean; var TempBlobIndicesNameValueBuffer: Record "Name/Value Buffer" temporary; var TempBlobList: Codeunit "Temp Blob List"; var OutputType: Option; var AnyOutputExists: Boolean; var InHandled: Boolean)` (integration)
- `OnBeforeSetIteratorJoinFieldRef(var ReportDataRecordRef: RecordRef; var BalAcctTypeFieldRef: FieldRef; var AcctTypeFieldRef: FieldRef; var IsHandled: Boolean)` (integration)
- `OnCreateReportWithExtensionOnBeforeHtmlFileClose(ReportID: Integer; RepFormat: ReportFormat; var DataRecRef: RecordRef; var FileStream: OutStream)` (integration)
- `OnCreateReportWithExtensionOnBeforePdfFileClose(ReportID: Integer; RepFormat: ReportFormat; var DataRecRef: RecordRef; var FileStream: OutStream)` (integration)
- `OnGenerateFileNameOnAfterAssignFileName(var FileName: Text; ReportID: Integer; Extension: Text; DataRecRef: RecordRef)` (integration)
- `OnSaveAsReportOnBeforeFileClose(ReportSaved: Boolean; var DataRecRef: RecordRef; ReportID: Integer; RepFormat: ReportFormat; var FileStream: OutStream)` (integration)
- `OnSetOutputTypeOnAfterSetOutputMethod(var OutputMethod: Text)` (integration)
- `OnAfterGetSendToEmailID(var CustomReportSelection: Record "Custom Report Selection"; var EmailID: Text[250])` (integration)
- `OnAfterGetSendToEmailIDFromSource(var CustomReportSelection: Record "Custom Report Selection"; var EmailID: Text[250])` (integration)
- `OnRunRequestPageOnBeforeReportRunRequestPage(ReportId: Integer; var SavedParameters: Text)` (integration)
- `OnProcessReportPerObjectOnBeforeReportDataRecordRefLoop(ReportDataAndIteratorDiffer: Boolean; IteratorRecordRef: RecordRef)` (integration)
- `OnProcessReportPerObjectOnBeforeRunReport(ReportDataAndIteratorDiffer: Boolean; IteratorRecordRef: RecordRef; var IsHandled: Boolean)` (integration)
- `OnProcessReportPerObjectOnAfterRunReport(ReportDataAndIteratorDiffer: Boolean; IteratorRecordRef: RecordRef)` (integration)
- `OnAfterProcessReportPerObject(ReportDataAndIteratorDiffer: Boolean)` (integration)
- `OnBeforeGenerateFileNameForReport(IteratorRecordRef: RecordRef; var NameFieldRef: FieldRef; ReportDataRecordRef: RecordRef; var ObjectName: Text; var IsHandled: Boolean)` (integration)
- `OnBeforeThrowProcessReportError(var ErrorMessageHandler: Codeunit "Error Message Handler"; var ReportDataRecordRef: RecordRef; var OutputType: Option)` (integration)

## Procedures

- `GetLayoutIteratorKeyFilter(var FilterRecordRef: RecordRef; var FilterRecordKeyFieldRef: FieldRef; CustomReportLayoutCode: Code[20])`
- `ProcessReport()`
- `ProcessReportData(ReportUsage: Enum "Report Selection Usage"; var DataRecordRef: RecordRef; SourceJoinFieldName: Text; DataRecordJoinTable: Integer; IteratorTableFieldName: Text; DataItemTableSameAsIterator: Boolean)`
- `SetOutputOption(OutputOption: Integer)`
- `GetOutputOption(ReportID: Integer): Integer`
- `GetPrintOption(): Integer`
- `GetEmailOption(): Integer`
- `GetPreviewOption(): Integer`
- `GetExcelOption(): Integer`
- `GetPDFOption(): Integer`
- `GetWordOption(): Integer`
- `GetXMLOption(): Integer`
- `GetOptionValueFromRequestPageForReport(ReportID: Integer; OptionName: Text): Text`
- `SetSavePath(SavePath: Text)`
- `SetOutputSupression(SupressOutputFlag: Boolean)`
- `CallReportSaveAs(ReportID: Integer; RequestParameterText: Text; ReportFormatValue: ReportFormat; var FileStream: OutStream; var RecRef: RecordRef): Boolean`
- `IsWebClient(): Boolean`
- `SetOutputFileBaseName(FileBaseName: Text)`
- `SetTestModeWebClient(TestModeSpoofWebClient: Boolean)`
- `InitializeReportData(ReportUsage: Enum "Report Selection Usage"; var DataRecordRef: RecordRef; SourceJoinFieldName: Text; DataRecordJoinTable: Integer; IteratorTableFieldName: Text; DataItemTableSameAsIterator: Boolean)`
- `InitializeData(ReportSelectionUsage: Integer; var DataRecordRef: RecordRef; SourceJoinFieldName: Text; DataRecordJoinTable: Integer; IteratorTableFieldName: Text; DataItemTableSameAsIterator: Boolean)`
- `HasRequestParameterData(ReportID: Integer): Boolean`
- `RunRequestPage(ReportId: Integer): Text`
- `SetTableFilterForReportID(ReportID: Integer; CustomerNo: Text)`
- `GetReportRequestPageParameters(ReportID: Integer): Text`
- `SaveReportRequestPageParameters(ReportID: Integer; XMLText: Text; OptionDataEncoding: TextEncoding)`
- `SaveReportRequestPageParameters(ReportID: Integer; XMLText: Text)`
- `CheckForCustomLayoutReportingJob()`
- `SetIgnoreRequestParameters(IgnoreParams: Boolean)`
- `SetPredefinedRequestParameters(NewPredefinedRequestParameters: Text)`
- `SetRunReportOncePerFilter(NewRunReportOncePerFilter: Boolean)`

Plus 58 local procedures.

## Triggers

OnRun

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 419 "File Management"](../codeunit/419.md) (15 calls: `AddFileToClientZip → ServerTempFileName`, `GenerateFileName → AppendFileNameWithIndex`, `GenerateFileName → CombinePath`, …)
- [Codeunit 4102 "Temp Blob List"](../codeunit/4102.md) (5 calls: `GetRequestParametersText → Get`, `GetViewFromParameters → Get`, `StoreRequestParameters → (object)`, …)
- [Codeunit 28 "Error Message Management"](../codeunit/28.md) (4 calls: `LogErrorEmailSendTo → LogError`, `LogSimpleError → LogSimpleErrorMessage`, `ProcessReport → Activate`, …)
- [Codeunit 4100 "Temp Blob"](../codeunit/4100.md) (4 calls: `GetRequestParametersText → CreateInStream`, `ProcessReport → CreateInStream`, `StoreRequestParameters → CreateOutStream`, …)
- [Codeunit 425 "Data Compression"](../codeunit/425.md) (4 calls: `AddFileToClientZip → CreateZipArchive`, `ProcessReport → AddEntry`, `ProcessReport → CloseZipArchive`, …)
- [Codeunit 46 "SelectionFilterManagement"](../codeunit/46.md) (4 calls: `ExcludeReportedObjects → AddQuotes`, `ExcludeReportedObjects → GetMaximumNumberOfParametersInSQLQuery`, `GetCustomerFilter → GetSelectionFilter`, …)
- [Codeunit 1530 "Request Page Parameters Helper"](../codeunit/1530.md) (2 calls: `GetOptionValueFromRequestPage → GetRequestPageOptionValue`, `GetViewFromParameters → ConvertParametersToFilters`)
- [Codeunit 29 "Error Message Handler"](../codeunit/29.md) (2 calls: `ProcessReport → HasErrors`, `ProcessReport → ShowErrors`)
- [Codeunit 4030 "Client Type Management"](../codeunit/4030.md) (2 calls: `IsBackground → GetCurrentClientType`, `IsWebClient → GetCurrentClientType`)
- [Codeunit 701 "Data Type Management"](../codeunit/701.md) (2 calls: `GetKeyFieldRef → FindFieldByName`, `GetNameFieldRef → FindFieldByName`)
- [Codeunit 8894 "Email Account"](../codeunit/8894.md) (2 calls: `CheckEmailSendTo → ValidateEmailAddresses`, `GetRequestParameters → IsAnyAccountRegistered`)
- [Codeunit 260 "Document-Mailing"](../codeunit/260.md) (1 call: `TryEmailReport → EmailFile`)
- [Codeunit 8617 "Config. Validate Management"](../codeunit/8617.md) (1 call: `SetReportDataItem → GetRelationInfoByIDs`)
- [Codeunit 8810 "Customer Layout - Statement"](../codeunit/8810.md) (1 call: `CheckForCustomLayoutReportingJob → CheckReportRunningInBackground`)
- [Codeunit 9657 "Report Management Helper"](../codeunit/9657.md) (1 call: `IsWordLayout → SelectedLayoutType`)

## Called by

- [Codeunit 8810 "Customer Layout - Statement"](../codeunit/8810.md) (9 calls: `EnqueueReport → RunRequestPage`, `RunReport → ProcessReportData`, `RunReport → SetOutputFileBaseName`, …)
- [Codeunit 8812 "Customer Statement Subscr"](../codeunit/8812.md) (1 call: `OnBeforeSaveReportAsPDF → GetReportRequestPageParameters`)
- [Table 77 "Report Selections"](../table/77.md) (1 call: `SaveReportAsPDFInTempBlob → GetReportRequestPageParameters`)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC25, BC27

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "Custom Layout Reporting")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
