我正在尝试在rdlc自定义代码中编写2个函数定义,如下所示
Public Function GetValue(ByVal total as Integer) As Integer
total = total - (total * 0.04)
Return total
End Function
Public Function GetCalValue(By caltotal as Integer) As Integer
caltotal = (caltotal - (caltotal * 0.04)) + (caltotal * 0.004)
Return caltotal
End Function
但是我收到以下错误:
Error 1 There is an error on line 5 of custom code: [BC30213] Comma or ')' expected.
C:\Users\user\Documents\Visual Studio 2012\Projects\WindowsApplication3\WindowsApplication3\Report5.rdlc WindowsApplication3
有人可以告诉我我犯了什么错误吗?
答案 0 :(得分:0)
Public Function GetCalValue(By caltotal as Integer) As Integer
“By”应为“ByVal”
Public Function GetCalValue(ByVal caltotal as Integer) As Integer