SSRS:使用表达式在文本框中格式化(缩进)新行

时间:2018-07-27 20:41:50

标签: reporting-services expression

在SSRS中,我有一个文本框,其值如下表达式所示,表达式位于单个文本框内,我需要对单个文本框中的行进行格式化。

 = "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."

当前输出为:

 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.

我必须格式化文本才能在同一点开始,并且预期输出如下:

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.

如何更改表达式以获取预期的输出? 谢谢!

1 个答案:

答案 0 :(得分:3)

这是悬挂式缩进属性的一种用法。使用负数获取所需内容的技巧。

Before text

Set the HANGING INDENT property

enter image description here

我不确定它如何在各种输出中呈现-我认为格式可能会在Excel中丢失。