Articles in this section
Category / Section

How to Removing Special Characters in URLs

Published:
Updated:

In Bold Reports, we offer a powerful solution for handling URL special characters through our code modules. These modules enable users to effortlessly decode URLs, removing special characters such as %20, %22, %E2, and more, ultimately resulting in accurate and user-friendly URLs. URLs often include these special characters, which can complicate their interpretation and usability. Bold Reports simplifies this issue by providing a straightforward method for users to decode and display URLs without these special characters, greatly enhancing the overall user experience.

To decode a URL in Bold Reports, follow these steps:

  1. Drag and drop a text box into your report and include the URL content along with any special characters.

  2. Click the grey area and add the following VB Code in code modules and then click OK.

    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
  1. Now set the expression for the text box as follows:
    image.png
=Code.Remove("https://demos.bold%20reports.com/aspnet%20-%20core/Report%22Viewer/Company%2FSales?v2")
  1. Save and preview the report. The special characters in the URL will be removed and displaying only the URL.
    image.png
Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied