2015-10-06 60 views
0

我試圖寫在RDLC自定義代碼2點函數的定義如下編寫自定義代碼的多個功能於報告RDLC

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
Public Function GetCalValue(By caltotal as Integer) As Integer 

「到」 應爲 「BYVAL」

Public Function GetCalValue(ByVal caltotal as Integer) As Integer 
+0

是的,這是一個愚蠢的錯誤。十分感謝你的幫助 :) –