AZGroups.com

Bringing together Arizona Technology Users And Enhancing the Careers of Developers
Welcome to AZGroups.com Sign in | Join | Help
in Search

SQL Reporting Services Dealing with HTML Markup in reports

Last post 09-22-2006, 5:58 AM by Samsonjr2. 2 replies.
Sort Posts: Previous Next
  •  09-21-2006, 1:20 PM 607

    SQL Reporting Services Dealing with HTML Markup in reports

    Hello all,

     I hope this is the right place to ask questions about Reporting Services!  Our current CMMS application stores the HTML markup as the data is entered into the comments fields.  So as I am build my reports and testing them I see a lot of <P> and &nbsp; within the report.  I did find =System.Text.RegularExpressions.Regex.Replace( Fields!COMMENTS.Value, "&nbsp;", " ") which changes &nbsp; to a blank space.  This works well, but I am still left with <P>.  However I want to remove the <P> in this as well, but I have no idea on how to add more then one expression.  I have searched regex, and because I am a novice I am unable to put two and two together at this point.

    If anyone can assist it would be greatly appreciated,

    -sam

  •  09-21-2006, 7:05 PM 609 in reply to 607

    Re: SQL Reporting Services Dealing with HTML Markup in reports

    Didn't test this yet:

     =System.Text.RegularExpressions.Regex.Replace( System.Text.RegularExpressions.Regex.Replace( Fields!COMMENTS.Value, "&nbsp;", " "), "<P>", " ")

     Let me know if nesting it doesn't work.

     I'm assuming that you are pulling this from a sql database?

    You could possibly pull all that stuff out in the stored proc for the report data.

  •  09-22-2006, 5:58 AM 610 in reply to 609

    Re: SQL Reporting Services Dealing with HTML Markup in reports

    This works great and yes I am pulling data from SQL Server 2000!

     Thank you very much.  I followed what you did and I was able to filter out </P> as well.  If there is anything I can do to help you, please ask!

    =System.Text.RegularExpressions.Regex.Replace( System.Text.RegularExpressions.Regex.Replace( System.Text.RegularExpressions.Regex.Replace( Fields!COMMENTS.Value, "&nbsp;", " "), "<P>", " "), "</P>", " " )

  • View as RSS news feed in XML
    Powered by Community Server, by Telligent Systems