How to Remove Special Characters from URLs in Bold Reports
To decode URLs and remove encoded special characters (such as %20, %22, or %2F) in Bold Reports Report Designer, add a custom Visual Basic (VB) function under Report Properties in the Code tab, then reference that function using =Code.Remove(Fields!URL.Value) inside your text box or hyperlink action expression.
When to use this
Use this when your dataset or API query contains URL-encoded strings (such as %20 for spaces, %2C for commas, or %22 for quotes) and you need to display clean, human-readable URLs on the report surface or format dynamic hyperlink targets.
Steps to Decode URL Encoded Characters
Step 1: Add a Text Box to the Report
- Open your report in the Bold Reports Report Designer.
- From the item panel on the left, drag and drop a Text Box item onto your design canvas.
Step 2: Open Report Properties and Access the Code Module
-
Click on the gray design surface area outside the report body margins to select the main Report object.
-
In the Properties panel on the right, locate the Code property (or click Report Properties > Code tab depending on your designer version).
-
In the code editor window, paste the following custom VB function:
Public Function Remove(ByVal input As String) As String input = input.Replace("%20", " ") input = input.Replace("%22", "") input = input.Replace("%E2", "") input = input.Replace("%80", "") input = input.Replace("%9C", "") input = input.Replace("%9D", "") input = input.Replace("%2C", ",") input = input.Replace("%2F", "/") Return input End Function -
Click OK or apply changes to save the custom code block.
Step 3: Reference the Function in the Text Box Expression
-
Select the text box you added in Step 1.
-
In the Properties panel, locate the Value property and click the expression icon (fx).
-
Call the custom function using the
=Code.<FunctionName>()syntax:=Code.Remove("https://demos.bold%20reports.com/aspnet%20-%20core/Report%22Viewer/Company%2FSales?v2")
Step 4: Preview and Verify the Result
-
Click Preview in the designer toolbar.
-
Verify that encoded substrings are transformed into readable characters:
- Before:
https://demos.bold%20reports.com/aspnet%20-%20core/Report%22Viewer/Company%2FSales?v2 - After:
https://demos.bold reports.com/aspnet - core/ReportViewer/Company/Sales?v2
- Before:
Result
The rendered report displays the decoded, clean URL without hex percent-encoding symbols (%20, %22, %2F, etc.). If configured on an interactive hyperlink or action, users see and navigate to properly formatted URLs across web preview, PDF, and print exports.