views:

207

answers:

3

I created a report in SQL Report Services 2005 and everything is coming out right but on my comments field I am getting bunch of HTML Tags which I dont want to show. See below the sample of my report comments field data. I really appreciate somebody let me know how to hide these tags not to show on the output of the report in my comment field. Thanks and appreciate your quick response.

<P>Meet with low bidder Hill York on site to go over each item in the scope of work.</P>
<P>Met with Richard Waugh, Joe Charles of Hill Pines, Jim Rogers, Ed Chris, Dwayne Right on site and both parties agreed that everything in the scope of work was covered in the bid. Awaiting approval from Council on August 6th 2010.</P>

+1  A: 

Use string.replace in the eypressions field to strip out the tags, perhaps.

The tags are most likely not coming from SSRS but are in your data. At least, I've never seen it SSRS add HTML tags...

gbn
I dont want replace any string. All I need write somehting that those HTML tags not to show. For example I want to write an expression saying if <P> or </P> occurs then do not show or hide otherwise show all the text. Let me know how to write an expression for this to make it happen and not to show. I really appreciate your help and kind support. Talk to you later.
The tags are not coming from Report Server though. They must be in your data. To hide them, you'll have to replace them
gbn
+2  A: 

The values must be coming from the source. I've not ever seen this in SSRS.

You'll need to use an expression to remove them and depending on how many are in your data this could become burdensome. The expression Replace(Replace(Fields!Comment.Value,"<P>",""),"</P>","") will remove them from a field name Comment.

StrateSQL
Thanks for the information I tried it and it works for part of it. Here what I did on the expressions.=Replace(Fields!COMMENTS.Value,"</P>","")This expression works fine to hide only one i.e. <P> but how to write If I have multiple text not to show such as not only <P> but also </P>, <BR> etc. How to write an expression by using my example above for multiple things not to show on the report.
You'll need to keep expanding on the values to suppress. Such as, Replace(Replace(Replace(Replace(Fields!Comment.Value,"<P>",""),"</P>",""),"<B>",""),"</BR>","") to suppress both the <P> and the <BR> tags. This is likely to get combersome if there are a lot of HTML tags.
StrateSQL
A: 

If you want to hide any comment that uses <p>, then try putting this in the Hidden property:

=iif(instr(Fields!Comment.Value,"<p>") > 0, True, False)
Rob Farley