RS stripping spaces from my records

  • Yello,

    We have a very simple report that lists the contents of a table called GenericReport that contains one field of varchar(120).  All the report needs to do is list the records in this table. 

    Unfortunately, I'm finding that RS will pick up the text from a record, and strip out any spaces at the beginning.  Which in turns destroy the formating of the text - removing any indents created by padding with spaces.

    The report doesn't do it when previewed from the designer, but does it when rendered in the browser via report manager.

    Anyone have experience of this, or know how to stop it.

    Thanks

     

  • >> but does it when rendered in the browser via report manager.

    Do you mean you are viewing this in internet explorer or netscape (as int html report).. if it's the case then you'll have to replace the indent spaces by "&nbsp ;" (without the space before the semi-column) to retain the formated format.

  • Unfortunately that's made no difference.  I don't see the ; in the text, but it's still stripping away the spaces. 

    Any more ideas?

  • Martin,

    You'll need to Replace() each of the spaces with

     

    which is the html code for a non-breaking space.

  • Sorry Martin I didn't see that the & NBSP ; had been removed from my post (or actually shown as a space like in your report)... but I'm glad I was right :-)... and thanx to william to recorrecting my error.

  • Still no joy, the following string

            4.50      0.59     23.73

    comes out on the report exactly as that!  However it's not shown in the designer.....

     

  • Well I never used the reporting services and I haven't found anything usefull on yahoo so I'm officially out of ideas. Good luck with that.

  • Try the Replace() with Chr(255) does that work?

  • Try using the <PRE> tag.

    ...<td><pre>Report data here</pre></td>...

  • Martin -

    Have you found a solution to this problem?

    I have a matrix report with 4 row headers (name, birthday, gender, etc.).  I want to display a column header for each.  RS merges the column headers into one textbox which I can't split, and it eats my spaces so I can't display a spaced string aligned with the columns.

    -Bill

     

  • Fraid not.  The official line from Microsoft is that they're aware of the problem.  They're not going to fix it as that then causes problems with word wrapping and searching.

    None of the suggestions from the great people here have worked, so I'm pretty much where I was in the beginning.  Up a creek without a paddle.

  • Thanks anyway! 

    -Bill

     

  • I have had the same problem with RS.  It strips the spaces in the row header.  Someone please help.

Viewing 13 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic. Login to reply