---
id: object/codeunit/8128
type: object
title: Codeunit 8128 "Report Filename Preview Mgt."
summary: Codeunit 8128 "Report Filename Preview Mgt." in ReportFilenameManager (Microsoft.Foundation.Reporting.FileNaming). 13 public procedures. Introduced in BC30.
tier: official
language: en
tags:
  - codeunit
  - reportfilenamemanager
versions:
  introduced: "30"
  last_changed: null
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-31T00:48:20.076Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: ae3fac5b110714ec59076cfea444bafd9070ce77758d996bf1b7451feee2138d
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/d2abc1d2ceae394331716c8183ef60e1534c2ce0/src/Apps/W1/ReportFilenameManager/app/src/codeunit/ReportFilenamePreviewMgt.Codeunit.al
    title: src/Apps/W1/ReportFilenameManager/app/src/codeunit/ReportFilenamePreviewMgt.Codeunit.al (main)
    date: null
    commit: d2abc1d2ceae394331716c8183ef60e1534c2ce0
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/12610
object_type: codeunit
object_id: 8128
name: Report Filename Preview Mgt.
namespace: Microsoft.Foundation.Reporting.FileNaming
app: ReportFilenameManager
extends: null
first_version: "30"
last_version: "30"
present_in:
  - "30"
changed_in: []
source_major: "30"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 44
  events: 0
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 0
  called_by: 0
  implements: 0
---

# Codeunit 8128 "Report Filename Preview Mgt."

> Codeunit 8128 "Report Filename Preview Mgt." in ReportFilenameManager (Microsoft.Foundation.Reporting.FileNaming). 13 public procedures. Introduced in BC30.

ReportFilenameManager · Microsoft.Foundation.Reporting.FileNaming · BC30 · [source at d2abc1d2](https://github.com/microsoft/BCApps/blob/d2abc1d2ceae394331716c8183ef60e1534c2ce0/src/Apps/W1/ReportFilenameManager/app/src/codeunit/ReportFilenamePreviewMgt.Codeunit.al) · facts from BC30

## Properties

| Property | Value |
|---|---|
| Access | Internal |

## Procedures

- `ChooseRecordToTest(var Pattern: Record "Report Filename Pattern"; var ChosenRecordId: RecordId; var ChosenRecordText: Text): Boolean` (internal)
- `ExplainNameForChosenRecord(var Pattern: Record "Report Filename Pattern"; ChosenRecordId: RecordId; var Filename: Text; var NameComesFrom: Text; var WhyNotThisPattern: Text; var FromThisPattern: Boolean)` (internal): The name the chosen record's file would get, and whether it comes from this pattern, another pattern, or Business Central itself.
- `ExplainNameForChosenRecord(var Pattern: Record "Report Filename Pattern"; Route: Enum "Report Filename Output Route"; ChosenRecordId: RecordId; var Filename: Text; var NameComesFrom: Text; var WhyNotThisPattern: Text; var FromThisPattern: Boolean)` (internal)
- `ExplainNameForRun(var Pattern: Record "Report Filename Pattern"; FilterView: Text; var Filename: Text; var NameComesFrom: Text; var WhyNotThisPattern: Text; var FromThisPattern: Boolean)` (internal): As ExplainNameForChosenRecord, for a run described by a filter rather than one record.
- `ExplainNameForRun(var Pattern: Record "Report Filename Pattern"; Route: Enum "Report Filename Output Route"; FilterView: Text; var Filename: Text; var NameComesFrom: Text; var WhyNotThisPattern: Text; var FromThisPattern: Boolean)` (internal): Empty means the run covers the whole table.
- `TryCountRun(TableNo: Integer; FilterView: Text; var Records: Integer): Boolean` (internal): Empty means the whole table.
- `ChooseRunToTest(var Pattern: Record "Report Filename Pattern"; var FilterView: Text; var FilterText: Text): Boolean` (internal): Lets the administrator describe the run by a filter. An empty filter means the whole table.
- `DescribeSelection(TableNo: Integer; FilterView: Text): Text` (internal): The run's filters, or a statement that the run covers every record.
- `FindRecordByDescription(TableNo: Integer; TypedText: Text; var ChosenRecordId: RecordId)` (internal): Finds a record typed into the Record field, matched case-insensitively against the same description the lookup displays. Raises an error when nothing matches.
- `BuildRecordsToTestAgainst(TableNo: Integer; ReportId: Integer; var RecordBuffer: Record "Report Filename Record Buffer"; var MoreThanListed: Boolean)` (internal): Lists records for the picker, capped at MaxRecordsListed; MoreThanListed reports truncation.
- `TryPreviewShape(var Pattern: Record "Report Filename Pattern"; var Resolved: Text; var Reason: Text): Boolean` (internal): The card's preview: the name built from each value's shape, needing no document and no permission to read one.
- `TryPreviewShapeOverAFewRecords(var Pattern: Record "Report Filename Pattern"; var Resolved: Text): Boolean` (internal): The example for a run of a few records, with values listed rather than collapsed.
- `TryPreviewShapeOverManyRecords(var Pattern: Record "Report Filename Pattern"; var Resolved: Text): Boolean` (internal): The example for a run of many records, with each field value collapsed into a first-to-last range.

Plus 31 local procedures.

## Recent changes

- 2026-10-27 [#12610 [Report Filename Manager] New app for configurable report output file names - Slice 651696 [vendor work]](../../changes/bcapps/12610.md) (main, BC30, feature, added)

## Across versions

- Present in: BC30
- Changed (declaration) in: none

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