SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Development Tools
 Reporting Services Development
 Custom Code
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

fmardani
Constraint Violating Yak Guru

433 Posts

Posted - 11/23/2006 :  17:38:26  Show Profile  Reply with Quote
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

Sweden
30277 Posts

Posted - 11/24/2006 :  01:16:39  Show Profile  Visit SwePeso's Homepage  Reply with Quote
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

Italy
232 Posts

Posted - 08/30/2013 :  05:17:49  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.12 seconds. Powered By: Snitz Forums 2000