---
id: change/bcapps/13680
type: change
title: "#13680 [Excel Reports] Handle an apostrophe in the No. on the Vendor and Customer Top List"
summary: Excel reports for top vendor and customer lists now handle apostrophes in account numbers correctly by properly escaping quotes in filter expressions.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - report exr customer top list
  - report exr vendor top list
system: purchasing
review:
  state: reviewed
  by: opus
  at: "2026-11-22T00:57:50.681Z"
  flags: []
generated:
  at: "2026-11-22T00:17:50.598Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 7fd9ac519c26ac75653c3795fe54380b3cff4341
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/13680
    title: "microsoft/BCApps#13680: [Excel Reports] Handle an apostrophe in the No. on the Vendor and Customer Top List"
    date: "2026-11-20"
    commit: 7fd9ac519c26ac75653c3795fe54380b3cff4341
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/report/4409
    - object/report/4404
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
  related:
    - to: https://learn.microsoft.com/dynamics365/business-central/reports/report-4409
      title: Customer - Top List (Excel Report)
      label: possibly related
      why: touches Report 4409 "EXR Customer Top List"
      by: code
    - to: https://learn.microsoft.com/dynamics365/business-central/reports/report-4404
      title: Vendor - Top List (Excel Report)
      label: possibly related
      why: touches Report 4404 "EXR Vendor Top List"
      by: code
number: 13680
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/13680
kind: pr
base_branch: main
major: "30"
merged_at: "2026-11-20T09:19:56Z"
author: Franco111000
author_type: User
community_contribution: true
labels:
  - "ADO: Sync"
  - "AL: Apps (W1)"
  - From Fork
  - "Ownership: Manual"
  - "Ownership: Needs Review"
  - SCM
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 3
  additions: 123
  deletions: 8
  al: 2
apps:
  - ExcelReports
objects_touched:
  - key: report/4409
    page: report/4409
    type: report
    id: 4409
    name: EXR Customer Top List
    app: ExcelReports
    status: modified
  - key: report/4404
    page: report/4404
    type: report
    id: 4404
    name: EXR Vendor Top List
    app: ExcelReports
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues:
  - 11329
work_items:
  - 659690
systems:
  - purchasing
  - sales
quote: null
joined_against:
  major: "30"
  commit: d2abc1d2ceae394331716c8183ef60e1534c2ce0
---

# #13680 [Excel Reports] Handle an apostrophe in the No. on the Vendor and Customer Top List

> Excel reports for top vendor and customer lists now handle apostrophes in account numbers correctly by properly escaping quotes in filter expressions.

[Pull request](https://github.com/microsoft/BCApps/pull/13680) · merged into `main` (BC30) on 2026-11-20 by Franco111000 (community contribution) · 3 files (+123 -8), 2 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Fixed NavInvalidFilterExpressionException when vendor or customer numbers contain apostrophes
- Escape helper now doubles internal quotes and uses Text parameter type instead of Code
- Single-value buffer lookups converted to SetRange for exact comparison instead of filter parsing
- Added tests verifying exports with apostrophes at start, middle, and end of account numbers
- No breaking changes; local helper modification affects only these reports
- Behaviour changes for users or extensions.

## AL objects touched

- [Report 4409 "EXR Customer Top List"](../../objects/report/4409.md), ExcelReports: modified
- [Report 4404 "EXR Vendor Top List"](../../objects/report/4404.md), ExcelReports: modified

## Context

- Fixes: [#11329 [Bug]: [Excel Reports] Vendor and Customer Top List reports fail with NavInvalidFilterExpressionException when a No. in the top N contains an apostrophe](https://github.com/microsoft/BCApps/issues/11329) (closed)
- Work items: AB#659690
- Labels: ADO: Sync, AL: Apps (W1), From Fork, Ownership: Manual, Ownership: Needs Review, SCM
- Systems: purchasing, sales

## Possibly related

No source states these links: they share an object, a model read them, or a person found the same subject.

- [Customer - Top List (Excel Report)](https://learn.microsoft.com/dynamics365/business-central/reports/report-4409) — possibly related: touches Report 4409 "EXR Customer Top List"
- [Vendor - Top List (Excel Report)](https://learn.microsoft.com/dynamics365/business-central/reports/report-4404) — possibly related: touches Report 4404 "EXR Vendor Top List"

Source: metadata of a merged pull request in microsoft/BCApps (bcapps): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).
