Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/jpa/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Reporting services 如何在SSRS Expression Builder中格式化邮政编码_Reporting Services - Fatal编程技术网

Reporting services 如何在SSRS Expression Builder中格式化邮政编码

Reporting services 如何在SSRS Expression Builder中格式化邮政编码,reporting-services,Reporting Services,我正在尝试格式化一个9位数的邮政编码,这是我目前拥有的,但它不起作用 IIf(Len(First(Fields!PostalCode.Value, "VesselCreditMemo"))>5, Format(First(Fields!PostalCode.Value, "VesselCreditMemo"), "00000-0000"),First(Fields!PostalCode.Value, "VesselCreditMemo") 非常感谢您提供的任何帮

我正在尝试格式化一个9位数的邮政编码,这是我目前拥有的,但它不起作用

IIf(Len(First(Fields!PostalCode.Value, "VesselCreditMemo"))>5,
      Format(First(Fields!PostalCode.Value, "VesselCreditMemo"),
       "00000-0000"),First(Fields!PostalCode.Value, "VesselCreditMemo")

非常感谢您提供的任何帮助。根据您的数据,您应该修改正则表达式,但通常是这样做的:

=System.Text.RegularExpressions.Regex.Replace(Fields!F1.Value, "(\d{5})(\d{4})", "$1-$2")
你可以用

=mid(Fields!PostalCode.Value,1,5) &"-"& mid(Fields!PostalCode.Value,6,4)

在文本框表达式中。

谢谢!这个和下面的一样好!!非常感谢。这个和上面的一样好!!