Leading Spaces from Database Record Not Showing in RDLC Text Box VS2005 RRS feed

  • Question

  • Hi,

    I've been having a hard time figure out why the leading spaces in a record are trimed automatically when the report is displayed on the web.

    Also if i put the following expression to replace the first space in the textbox to a period, the spaces after the first character will show up.


    " ", ".",1,1)

    Please advise.


    Friday, March 18, 2011 1:51 AM

All replies

  • I don't have a solution but have essentially the same problem. To keep things vertically aligned in a particular way across the cells of a table, I want to add a blank line above or below the text in certain cell textboxes.

    Adding a linefeed (vbCrLf) and then a blank space on the new line (" ") works perfectly when tacked onto the end of the textbox expression (it moves the visible text up), but trying the same thing before the text (" " & vbCrLf) has no effect -- it seems that all leading whitespace is stripped from the expression.

    Like you, if I put a period on the line above (or any non-whitespace character), the spacing works, except that I have a stray dot or other char floating above the text, which is not acceptable for my situation.

    I also tried forcing a "No-break space" (Alt+0160) character, tried using Chr(160), and some other things but have found no way to prefix text with any kind of whitespace.


    Thursday, April 14, 2011 1:04 AM