Missing Leading Spaces in SQL Reporting Services Reports
Problem: In SQL 2000 Reporting Services, I need to display indented text in my report. I use leading, embedded spaces to do this work and they display correctly in PDF/TIFF/Excel, but the leading spaces in the report are stripped out in HTML. What gives?
Answer: IE automatically strips out spaces in HTML.
Workaround: Use CHR(160) to replace your spaces with an
Instead of " My string with two leading spaces", use = chr(160) & chr(160) & "My string with two leading spaces". You can also use this technique in an expression for a textbox in your report.
Caveats: Using this technique will break IE's ability to wordwrap correctly and its "Find" functionality if you search on a phrase which includes the