Bar type report exporedt to PDF displays 'amp&;' instead of '&' as a stacked value label on a data table


Description

When exporting to PDF a bar type report, that has a Stacked by selection, of a choice record and one of the choices has a label with an ampersand (&), the PDF will display the label with ' amp&; ' instead of ' & '.

Steps to Reproduce

The pre-requisite is to have a choice field with a choice value label that has an ampersand. For testing purposes, we used the Subcategory field in the Incident table and added a choice value labeled "SNC & Test". Select that choice as a value to several records. The steps below are when using the new UI, but the behavior is the same in the Classic UI.

1. Navigate to Reports > View/Run

2. Select"Create a Report"

3. Configure as follows:
-Report name: (any)
-Source type:: Table
-Table: Incident
-Type: Bar
-Group by: (select any, for our test, we selected Active, as all the incidents whom we assigned that value to were not active)
-** Stack by: Subcategory (or whatever your choice field is)
-** Select "Display data table"
-Optional: to minimize the results, we added a filter for the choice value we are testing with ("Subcategory is SNC & Test")

5. Save the Report

6. Click on the Sharing icon (in the header) and choose the "Export to PDF"option
Orientation: (any); Delivery: "Generate now"

7. "Export" when it finishes, "Download"

8. Open the downloaded file

The choice label with the ampersand displays as "&" in the data table at the bottom (in our test, under the subcategory label: "SNC & Test"). The column label displays correctly.

Workaround

After carefully considering the severity and frequency of the issue, and the cost and risk of attempting a fix, it has been decided to not address this issue in any current or near future releases. We do not make this decision lightly, and we apologise for any inconvenience.

A workaround is to use the word "and" instead of the ampersand character.


Related Problem: PRB1383823