RDLC 微软报表 自定义函数
报表的空白处点右键,报表属性,CODE,按下面的格式输入自定义函数:
Shared Function ShowDate(value as DateTime) as stringif value<=DateValue("1900-1-1") thenreturn ""elsereturn FormatDateTime(value,DateFormat.ShortDate)end ifEnd Function

调用: 表达式中输入
=code.ShowNumber(Fields!PurchCC.Value,3)

格式化数字:
Shared Function ShowNumber(value as Double, digit as integer ) as stringif value=0 thenreturn ""elsereturn FormatNumber(value, digit)end ifEnd Function

浙公网安备 33010602011771号