【问题标题】:Writing multiple functions in custom code in report rdlc在报表 rdlc 的自定义代码中编写多个函数
【发布时间】:2015-10-07 03:17:10
【问题描述】:

我正在尝试在 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

谁能告诉我我犯了什么错误?

【问题讨论】:

    标签: vb.net rdlc


    【解决方案1】:
    Public Function GetCalValue(By caltotal as Integer) As Integer
    

    “By”应该是“ByVal”

    Public Function GetCalValue(ByVal caltotal as Integer) As Integer
    

    【讨论】:

    • 是的,这是一个愚蠢的错误。非常感谢您的帮助:)
    猜你喜欢
    • 1970-01-01
    • 2017-01-15
    • 2018-12-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-06-05
    • 1970-01-01
    相关资源
    最近更新 更多