Hide text in rdlc report IF text is between [square brackets] RRS feed

  • Question

  • User1023009977 posted

    I want to hide text in rdlc report IF text is between [square brackets].  This will allow me to put supplier identifiers between the square brackets without having these identifiers show up on our outgoing documents. I am a novice in rdlc report development, and am hoping for a string of code which will block the hidden text for the entire document.

    Thursday, December 5, 2019 1:57 AM

All replies

  • User665608656 posted

    Hi kimolinders,

    Does the bracketed text you mentioned refer to the bracketed text contained in the data source of your report?

    As far as I know, if you want to create a public method to determine whether the current text contains brackets and hide them, you need to do the following steps:

    1. Create a custom assembly that includes a method to verify your requirements.
    2. You need to copy the custom assembly to the sql reporting services folder.
    3. Add a reference to the custom assembly in reporting services.

    You can refer to this link for detailed process : How to use custom assemblies or embedded code in Reporting Services

    And here is how to intercept the bracketed content in the string and replace it with other content:

    Replace [ ] bracket in a string

    Best Regards,


    Friday, December 6, 2019 9:48 AM
  • User1023009977 posted

    Hi YongQing,

    Thank you for you solution, I'll try to make this work. And you are correct, the bracketed text is indeed contained in the data source.

    Kind regards,


    Saturday, December 7, 2019 12:30 AM