Articles in this section

How to Remove Special Characters from URLs in Bold Reports

Published:
Updated:

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

  1. Open your report in the Bold Reports Report Designer.
  2. 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

  1. Click on the gray design surface area outside the report body margins to select the main Report object.

  2. In the Properties panel on the right, locate the Code property (or click Report Properties > Code tab depending on your designer version).

  3. In the code editor window, paste the following custom VB function:

    image.png

    image.png

        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
    
  4. Click OK or apply changes to save the custom code block.

Step 3: Reference the Function in the Text Box Expression

  1. Select the text box you added in Step 1.

  2. In the Properties panel, locate the Value property and click the expression icon (fx).

  3. Call the custom function using the =Code.<FunctionName>() syntax:

    image.png

    =Code.Remove("https://demos.bold%20reports.com/aspnet%20-%20core/Report%22Viewer/Company%2FSales?v2")
    

Step 4: Preview and Verify the Result

  1. Click Preview in the designer toolbar.

  2. 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

    image.png

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.

Related articles

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied