1
我正在尝试在ReportViewer中格式化一个数字。我想要的号码格式为001
。要做到这一点,我试图使用TextBox的格式属性,但仍然没有成功。我怎么能这样做?如何将数字格式化为reportviewer?
尝试。
=FormatNumber(Fields!terminal.Value, String.Format("{0:000}"))
我正在尝试在ReportViewer中格式化一个数字。我想要的号码格式为001
。要做到这一点,我试图使用TextBox的格式属性,但仍然没有成功。我怎么能这样做?如何将数字格式化为reportviewer?
尝试。
=FormatNumber(Fields!terminal.Value, String.Format("{0:000}"))
功能FormatNumber是不会为你做的。
而是使用以下expession在文本框
= Right("000" & Cstr(Fields!terminal.Value),3)
这会将值转换为字符串,然后添加到前3个零,然后返回该字符串的最后3个字符。
不要设置文本框的格式属性。
非常完美,非常感谢! – FernandoPaiva