Multiline Textbox in Page Report Standalone Designer

Posted by: tmcgehee on 16 June 2020, 1:03 pm EST

    • Post Options:
    • Link

    Posted 16 June 2020, 1:03 pm EST

    How do you create a multiline textbox on a page report in the standalone designer (winforms) using multiple fields? I need to create a multiline textbox with customer name, address, and city-state-zip (5 fields) on three lines.

  • Posted 17 June 2020, 12:53 am EST

    Hello,

    Please use the following expression in the TextBox fields:

    =Fields!FirstName.Value +vbCrLf + Fields!Address.Value  + vbCrLf+ Fields!City.Value +", " + Fields!Country.Value +", " + Fields!PostalCode.Value
    

    Thanks,

    Mohit

  • Posted 17 June 2020, 9:40 am EST

    That worked - thanks. The vbCrLf is a VB syntax. Is VB syntax always used in the text box expression or can C# syntax be used? If C# can be used there is no equivalent to vbCrLf other than System.Environment.NewLine or “\r\n” - neither of which work. What would be used in that case?

    Thanks

    Tom

  • Posted 18 June 2020, 1:01 am EST

    Hello,

    Yes, only VB syntax is used in the TextBox expression.

    Thanks,

    Mohit

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels