Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的报告中有一个字段需要长度为 40。如果字符串不是那个长度,我需要附加一些空格。
谢谢。
尝试一些类似的东西
if length({yourfieldname here}) < 40 then {yourfieldnamehere} + space(40 - length({yourfieldnamehere})) 否则 {yourfieldnamehere}
将 40 个空格附加到变量并获取结果字符串的前 40 个字符。
就像是
mid( (yourfield + space(40)), 1, 40)
应该管用。