---
id: object/codeunit/228
type: object
title: Codeunit 228 "Test Report-Print"
summary: Codeunit 228 "Test Report-Print" in Base Application (Microsoft.Foundation.Reporting). 24 public procedures, 9 events. Present since at least BC23, still in BC30, changed in BC24-25, BC28.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: "28"
  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: 450351c0af0f40a9a7d8f4ff3bc4863021de96312f031167b2cbc30d39a2530b
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Foundation/Reporting/TestReportPrint.Codeunit.al
    title: src/Layers/W1/BaseApp/Foundation/Reporting/TestReportPrint.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: 228
name: Test Report-Print
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:
  - "24"
  - "25"
  - "28"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 33
  events: 9
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 2
  called_by: 0
  implements: 0
---

# Codeunit 228 "Test Report-Print"

> Codeunit 228 "Test Report-Print" in Base Application (Microsoft.Foundation.Reporting). 24 public procedures, 9 events. Present since at least BC23, still in BC30, changed in BC24-25, BC28.

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

## Events published

- `OnAfterCalcSalesDiscount(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line")` (integration)
- `OnAfterCalcPurchDiscount(var PurchHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line")` (integration)
- `OnBeforePrintGenJnlLine(var NewGenJnlLine: Record "Gen. Journal Line"; var IsHandled: Boolean)` (integration)
- `OnCalcSalesDiscOnAfterSetFilters(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header")` (integration)
- `OnCalcPurchDiscOnAfterSetFilters(var PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header")` (integration)
- `OnCalcSalesDiscOnBeforeRun(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line")` (integration)
- `OnCalcPurchDiscOnBeforeRun(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line")` (integration)
- `OnPrintGenJnlLineOnAfterGenJnlLineCopy(var GenJnlLine: Record "Gen. Journal Line")` (integration)
- `OnPrintVATStmtLineOnBeforeReportRun(VATStatementTemplate: Record "VAT Statement Template"; VATStatementLine: Record "VAT Statement Line"; var IsHandled: Boolean)` (integration)

## Procedures

- `PrintGenJnlBatch(GenJnlBatch: Record "Gen. Journal Batch")`
- `PrintGenJnlLine(var NewGenJnlLine: Record "Gen. Journal Line")`
- `PrintVATStmtName(VATStmtName: Record "VAT Statement Name")`
- `PrintVATStmtLine(var NewVATStatementLine: Record "VAT Statement Line")`
- `PrintItemJnlBatch(ItemJnlBatch: Record "Item Journal Batch")`
- `PrintItemJnlLine(var NewItemJnlLine: Record "Item Journal Line")`
- `PrintResJnlBatch(ResJnlBatch: Record "Res. Journal Batch")`
- `PrintResJnlLine(var NewResJnlLine: Record "Res. Journal Line")`
- `PrintSalesHeader(NewSalesHeader: Record "Sales Header")`
- `PrintSalesHeaderPrepmt(NewSalesHeader: Record "Sales Header")`
- `PrintPurchHeader(NewPurchHeader: Record "Purchase Header")`
- `PrintPurchHeaderPrepmt(NewPurchHeader: Record "Purchase Header")`
- `PrintBankAccRecon(NewBankAccRecon: Record "Bank Acc. Reconciliation")`
- `PrintFAJnlBatch(FAJnlBatch: Record "FA Journal Batch")`
- `PrintFAJnlLine(var NewFAJnlLine: Record "FA Journal Line")`
- `PrintInsuranceJnlBatch(InsuranceJnlBatch: Record "Insurance Journal Batch")`
- `PrintInsuranceJnlLine(var NewInsuranceJnlLine: Record "Insurance Journal Line")`
- `PrintWhseJnlBatch(WhseJnlBatch: Record "Warehouse Journal Batch")`
- `PrintWhseJnlLine(var NewWhseJnlLine: Record "Warehouse Journal Line")`
- `PrintInvtPeriod(NewInvtPeriod: Record "Inventory Period")`
- `PrintJobJnlBatch(JobJnlBatch: Record "Job Journal Batch")`
- `PrintJobJnlLine(var NewJobJnlLine: Record "Job Journal Line")`
- `CalcSalesDiscount(var SalesHeader: Record "Sales Header")`
- `CalcPurchDiscount(var PurchHeader: Record "Purchase Header")`

## 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 60 "Sales-Calc. Discount"](../codeunit/60.md) (1 call: `CalcSalesDiscount → (object)`)
- [Codeunit 70 "Purch.-Calc.Discount"](../codeunit/70.md) (1 call: `CalcPurchDiscount → (object)`)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC24-25, BC28

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: "Test Report-Print")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
