Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 Custom Code

Author  Topic 

fmardani
Constraint Violating Yak Guru

433 Posts

Posted - 2006-11-23 : 17:38:26
Hi,

Wrote a Custom Code i.e. a function.
Can not refer to this function from an expression area. It says unrecognized identifier.

Public Function TaxDeductions(ByVal Amount As Double) As Double
TaxDeductions = Amount * .25 + Amount * 0.05
End Functrion

Code.TaxDeductions(Sum(Fields!LineAmount.Value)

Any thoughts please?

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-11-24 : 01:16:39
You are missing a ending paranthesis. Keep track of them.

Sum(Code.TaxDeductions(Fields!LineAmount.Value))
or
Code.TaxDeductions(Sum(Fields!LineAmount.Value))


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

Ciupaz
Posting Yak Master

232 Posts

Posted - 2013-08-30 : 05:17:49
Hello all,
I have the same problem when porting a SSRS 2003 in 2008 version.
Suddenly this function will prompt an "unrecognized identifier" in the Expression editor:

Public Function GetCons(id as object) as Double
if (combIDs is Nothing) Then
GetCons = 0.0
else
If (combIDs.ContainsKey(CStr(id))) Then
GetCons = CDbl(combIDs.Item(CStr(id)))
Else
GetCons = 0.0
End If
End If
End Function

What's wrong with this?

Luis
Go to Top of Page
   

- Advertisement -