We have a "Comment" field that is saved as a HTML string to the DB. This field needs to be pulled into a report as rendered HTML.
I know this has been hashed out before, but has anybody found a good solution in the past couple of months
We are thinking about storing two versions of the Comment in the DB: one with HTML, one as simple text. Has anybody found this an acceptable solution I know it flies in the face of good DB design, but it seems the quickest, easiest solution...
Any word if this will be fixed in the next major release of SSRS Can we expect this release any time soon
Thanks for looking,
Smith

HTML String Rendering in a Report
CRJ
Create Function dbo.fnStripTags
(@Dirty varchar(4000))
Returns varchar(4000)
As
Begin
Declare @Start int,
@End int,
@Length int
While CharIndex('<', @Dirty) > 0 And CharIndex('>', @Dirty, CharIndex('<', @Dirty)) > 0
Begin
Select @Start = CharIndex('<', @Dirty),
@End = CharIndex('>', @Dirty, CharIndex('<', @Dirty))
Select @Length = (@End - @Start) + 1
If @Length > 0
Begin
Select @Dirty = Stuff(@Dirty, @Start, @Length, '')
End
End
return @Dirty
End
Homebrew
Try translating tabs into spaces, ie:
Fields!Field.Value.Replace("\t", new String (' ', 10))
We should translate multiple sequential spaces into non-breaking spaces - so this should work though I'm not sure how consistent it will appear across the various renderers.
Thanks, Donovan.
Jasaldrich
Line breaks (\r\n) are translated into a linebreak in HTML (<BR>). If you're seeing boxes, your data probably just uses \n to represent a linebreak. Try doing a .Replace("\n", "\r\n") on the value of your textbox.
Tabs will be passed through to HTML but web browsers will treat them as general whitespace and ignore the fact that they represent a larger indentation.
Thanks, Donovan.
pink_flower4love
dmoses
Sure, you can replace the li tag with CHAR Code 149 by doing something like this here:
REPLACE(SomeColumn,'<li>',CHAR(149))
and of corse remove the other tag like REPLACE(SomeColumn,'</li>','')
HTH, Jens Suessmeyer.
---
http://www.sqlserver2005.de
---
Cinni
Sorry. No, RTF is not supported. Line breaks and space-based indentations are special cases.
Thanks, Donovan.
GlynD_002
This is the first time I’ve implemented a DB function. I’m a noob (as if you couldn’t tell).
While it still doesn’t solve my underlying problem, retaining formatting, it does offer one more step toward a solution.
Has anybody taken it a step further and inserted chars, like dots for bullets, into the resulting output based on the <li> tag That’s my next step; if it’s feasible.
The customers\ bosses won’t be happy with the loss of formatting, but if they don’t get their bullets… it’ll be grim.
Smith
Bryan_Andes
Hi Luis,
Do you mean you can display HTML in SQL Report Services using Webservices
Do you have a url for your blog, or the article you mentioned
Philip
Khalique
Have your tried rendering with webservices
Take a loot at my space/blog, there is agood article about it, maybe its what you need
Norman37050
HTH, Jens Suessmeyer.
---
http://www.sqlserver2005.de
---
victoravilanet
Yes, that is exactly what I'm trying to accomplish... And that's what I was afraid of. I think our coders have some custom controls to do just this...
How does SSRS interpret plain text strings to keep formatting such as line breaks and tab formatting Does anybody have any text encoding recommendations that works well with SSRS I looked at some legacy data and it has little square boxes in it to represent line breaks. I don't want to lose all my formatting ...
Smith
SHAILESH KUMAR PANDEY
Thanks for your input...
I guess the natural progression of questioning this is how would I force the Report Designer (in BIS) to keep an indention made during design
I can get it to render fine in preview; not so fine in deployment or exporting. I've tried using HTML tags to render the indention for deployment, but they get rendered as text as well in preview and deployment.
Anybody know the status of a SSRS updates
Thanks,
Smith