6.报表中使用自定义嵌入式代码 ReportingService 只接受Microsoft Visual Basic .NET 中编写嵌入式代码, 代码准备好,您就可以使用全局定义的 Code 成员在报表表达 式中调用它。例如,如果您编写了一个名为 GetValue 的嵌入式代码函数,就可以使用下列语法从您的表达式中调用它: 6.1.在报表<属性>中,选择<代码>页签,输入自定义代码 Function GetValue(value As Object) As Object if Value is Nothing then return 0 else return value end if End Function 6.2.调用方法: =Code.GetValue(Code.GetValue(Fields!字段名.Value))