Formated Text from SQL Database not shown correctly VS2010 RRS feed

  • Question

  • I have text saved as NVar in a sql 2000 Database this text is formated(new lines, breaks) which is shown when displayed in the application in a textbox or in the old CR Reporting solution.

    Now in VS2010 RDLC the text wont be formated in any way when put into a text box, is there anything that could bring me back the formatting that works in other ways.

    Tuesday, June 29, 2010 11:01 AM


All replies

  • Is there anything i can do? I have complete controll over the whole project, from ui to database, so if there is a sollution i should be able to apply it.

    This is the last problem i have to solve to be able to finsih the project. So if anybody has an idea please come forward.

    As a question:
    What is the carrige return for RDLC in VS 2010?


    Monday, July 5, 2010 8:33 AM
  • I still have the problem but i investigated it more to find a solution.

    i used this code:

    For Each ch As Char In str
     Debug.WriteLine(Convert.ToInt32(ch).ToString(), ch)

    To check what in the text that does the new lines. It shows that the breaks/new lines are done with Chr(13) and Chr(10). They work in every other way of displaying the text, be it a textbox a messagebox or even when inspecting the varriables during debuging i see the linebreaks and carriage returns. I tried replacing the chr(13) with vbclrf or inserting it instead of them but it wont show on the report.

     Thanks to everyone who can help in adavance.

    Edit: One of my guesses is that is has something to do with the Language of the application which is german.

    Friday, July 16, 2010 12:48 PM
  • =Replace(First(Fields!YourField.Value, "DataSource"),CHR(10),VbCrLf) 

    =Replace(First(Fields!YourField.Value, "DataSource"),CHR(13),VbCrLf)

    This fixed it for me. Found here

    Seems to be a bug from 2005. 

    • Marked as answer by max_L Thursday, July 22, 2010 1:22 PM
    Thursday, July 22, 2010 1:22 PM