Freigeben über


Reporting Services: How to stop IE striping out leading spaces in report data values

Reporting Services: How to stop IE striping out leading spaces in report data values:

My thanks to Russell Christopher and Mike Schetterer who recently discussed the problem that IE will strip out leading spaces from data in a report. The solution: you have to replace the spaces with the ASCII code for non-breaking space, not the HTML expression for non-breaking space. IE wont interpret "&nbsp" as anything other than "&nbsp", this prevents malicious HTML injection.

So the answer is to use the expression : =Replace(Fields!Data.Value, " ", chr(160))

Comments

  • Anonymous
    June 20, 2005
    Or, save yourself the trouble of all that and just enclose your report in <pre> tags.