我的报告中有一个字段需要长度为40.如果字符串不是那么长,我需要添加一些空格。
感谢。
答案 0 :(得分:3)
按照
的方式尝试if length({yourfieldname here})< 40 然后 {yourfieldnamehere} + space(40 - length({yourfieldnamehere})) 其他 {yourfieldnamehere}
答案 1 :(得分:2)
将40个空格附加到变量并获取结果字符串的前40个字符。
像
这样的东西mid( (yourfield + space(40)), 1, 40)
应该有效。