user9017400
user9017400

Reputation: 35

SSRS : Format (indentation) new lines in a textbox using expression

In SSRS, I have a textbox with value as below expression, Expression is within a single textbox and I need format the lines in that single textbox.

 = "Test Example " 
    & vbcrlf & SPACE(10)+ "First Name," + "  Middle Name," + " Last Name"
    & vbcrlf & SPACE(10)+ "Address 1," + " Address 2," + " Address 3"
    & vbcrlf & SPACE(10)+ "Instructions: " + " Please select your country from the list below so we can display the correct prices, delivery times and shipping costs for your shipping destination."

Current Output is:

 Test Example
       First Name, Middle Name, Last Name
       Address 1, Address 2, Address 3
       Instructions: Please select your country from the list below so we can 
    display the correct prices, delivery times and shipping costs for your 
    shipping destination.

I have to format the text to start at same point and Expected Output is below:

Test Example
       First Name, Middle Name, Last Name
       Address 1, Address 2, Address 3
       Instructions: Please select your country from the list below so we 
       can display the correct prices, delivery times and shipping costs for 
       your shipping destination.

How can I change the expression to get expected output? Thank you!

Upvotes: 2

Views: 1473

Answers (1)

Hannover Fist
Hannover Fist

Reputation: 10860

This is the one use for the Hanging Indent property. The trick to use a negative number to get what you want.

Before text

Set the HANGING INDENT property

enter image description here

I'm not sure how this renders in various outputs - I think the formatting might be lost in Excel.

Upvotes: 3

Related Questions