Codeunit 44 "ReportManagement"
Base Application · Microsoft.Foundation.Reporting
Across versions
- BC23present
- BC242 procedures changed, 1 procedures added
- BC25unchanged
- BC262 events changed, 1 procedures changed
- BC271 events added
- BC28unchanged
- BC294 procedures added, 2 procedures removed
- BC30unchanged
Neighbourhood 7 connected objects and pages
Base Application · Microsoft.Foundation.Reporting · BC23-30 · source at ea08af5e · facts from BC29
Properties
| Property | Value |
|---|---|
| SingleInstance | true |
Events published
OnSelectReportLayout(var ReportLayoutList: Record "Report Layout List"; var Handled: Boolean)(integration)- subscribers: Codeunit 9660 “Report Layouts Impl.” SelectReportLayoutUI
OnAfterSelectReportLayoutUI(ObjectID: Integer; var LayoutName: Text; var LayoutAppID: Guid; Success: Boolean)+ BC27 (integration)OnAfterGetPrinterName(ReportID: Integer; var PrinterName: Text[250]; PrinterSelection: Record "Printer Selection")(integration)OnAfterHasCustomLayout(ObjectType: Option "Report","Page"; ObjectID: Integer; var LayoutType: Option "None",RDLC,Word,Excel,Custom)(integration)OnAfterGetPaperTrayForReport(ReportID: Integer; var FirstPage: Integer; var DefaultPage: Integer; var LastPage: Integer)(integration)OnAfterSubstituteReport(ReportId: Integer; RunMode: Option Normal,ParametersOnly,Execute,Print,SaveAs,RunModal; RequestPageXml: Text; RecordRef: RecordRef; var NewReportId: Integer)(integration)OnAfterDocumentPrintReady(ObjectType: Option "Report","Page"; ObjectID: Integer; ObjectPayload: JsonObject; DocumentStream: InStream; var Success: Boolean)(integration)OnAfterSetupPrinters(var Printers: Dictionary of [Text[250], JsonObject])(integration)OnAfterIntermediateDocumentReady(ObjectId: Integer; ObjectPayload: JsonObject; DocumentStream: InStream; var TargetStream: OutStream; var Success: Boolean)(integration)OnAfterDocumentReady(ObjectId: Integer; ObjectPayload: JsonObject; DocumentStream: InStream; var TargetStream: OutStream; var Success: Boolean)(integration)OnAfterDocumentDownload(ObjectId: Integer; ObjectPayload: JsonObject; DocumentStream: InStream; var Success: Boolean)(integration)OnCustomDocumentMergerEx(ObjectID: Integer; ReportAction: Option SaveAsPdf,SaveAsWord,SaveAsExcel,Preview,Print,SaveAsHtml; ObjectPayload: JsonObject; var XmlData: InStream; LayoutData: InStream; var DocumentStream: OutStream; var IsHandled: Boolean)Δ BC24 (integration): Invoke the OnCustomDocumentMergeEx trigger, which handled user defiend report renders given a dataset and a layout. The Render must be implemented in AL and return the output stream as defined by the format given in ReportAction.OnSelectReportLayoutCode(ObjectId: Integer; var LayoutCode: Text; var LayoutType: Option "None",RDLC,Word,Excel,Custom; var IsHandled: Boolean)(integration): Fetch the currently selected layout code and layout type from application.OnFetchReportLayoutByCode(ObjectId: Integer; LayoutCode: Text; var TargetStream: OutStream; var IsHandled: Boolean)(integration): Fetch the currently selected layout code from application.OnGetFilename(ReportID: Integer; Caption: Text[250]; ObjectPayload: JsonObject; FileExtension: Text[30]; ReportRecordRef: RecordRef; var Filename: Text; var Success: Boolean)+ BC24 (integration)- subscribers: Codeunit 1890 “Reminder Communication” GetFilename
Event subscriptions
- GetPrinterNameSubscriber subscribes to Codeunit “Reporting Triggers” GetPrinterName
- OnSetAsDefaultPrinterForCurrentUser subscribes to Codeunit “Printer Setup” OnSetAsDefaultPrinter
- GetPrinterSelectionsPage subscribes to Codeunit “Printer Setup” GetPrinterSelectionsPage
- GetPaperTrayForReport subscribes to Codeunit “Reporting Triggers” GetPaperTrayForReport
- HasCustomLayout subscribes to Codeunit “Reporting Triggers” HasCustomLayout
- CustomDocumentMergerEx subscribes to Codeunit “Reporting Triggers” CustomDocumentMergerEx
- SelectedBuiltinLayoutType subscribes to Codeunit “Reporting Triggers” SelectedBuiltinLayoutType
- SubstituteReport subscribes to Codeunit “Reporting Triggers” SubstituteReport
- OnDocumentPrintReady subscribes to Codeunit “Reporting Triggers” OnDocumentPrintReady
- SetupPrinters subscribes to Codeunit “Reporting Triggers” SetupPrinters
- OnIntermediateDocumentReady subscribes to Codeunit “Reporting Triggers” OnIntermediateDocumentReady
- OnDocumentReady subscribes to Codeunit “Reporting Triggers” OnDocumentReady
- OnDocumentDownload subscribes to Codeunit “Reporting Triggers” OnDocumentDownload
- SelectReportLayoutCode subscribes to Codeunit “Reporting Triggers” SelectReportLayoutCode
- FetchReportLayoutByCode subscribes to Codeunit “Reporting Triggers” FetchReportLayoutByCode
- SelectReportLayoutUI subscribes to Codeunit “Reporting Triggers” SelectReportLayoutUI
- GetFilename subscribes to Codeunit “Reporting Triggers” GetFilename
- GetCompanyMetadataSubscriber subscribes to Codeunit “Reporting Triggers” GetCompanyMetadata
Procedures
GetPrinterName(ReportID: Integer; var PrinterName: Text[250])GetCompanyMetadata(var CompanyMetadata: JsonObject)+ BC29: Populates the shared CompanyMetadata payload from Company Information for the report layouts’ company block. Empty-safe: with no Company Information record the fields are emitted blank rather than erroring. Public so it can be invoked/verified directly; extension and localization fields are added by…
Plus 2 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 9666 “Company Metadata Builder” (4 calls:
GetCompanyMetadata → PopulateFromCompanyInformation,GetCompanyMetadata → SetDisplayName,GetCompanyMetadata → SetLogo, …) - Codeunit 9654 “Design-time Report Selection” (3 calls:
SelectReportLayoutCode → ClearLayoutSelection,SelectReportLayoutCode → GetSelectedAppID,SelectReportLayoutCode → GetSelectedLayout) - Codeunit 4100 “Temp Blob” (1 call:
FetchReportLayoutByCode → CreateInStream) - Codeunit 4110 “Base64 Convert” (1 call:
GetLogoBase64 → ToBase64)
Called by
- Table 77 “Report Selections” (1 call:
DrillDownToSelectLayout → OnSelectReportLayout)
Recent changes
- 2026-08-03 #9094 Add shared CompanyMetadata data source for report layouts (main, BC30, feature)
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: "ReportManagement"), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.