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
 Unrecognized identifier error in custom code

Author  Topic 

Ciupaz
Posting Yak Master

232 Posts

Posted - 2013-09-11 : 06:16:28
Hello all,
I've made a Report porting from SS2008 to SS2008.
In a textbox I use a:

Number -> Custom Format

like these:

=Code.FormatString(Fields!NumDecRpt.Value)

but gives me the "Unrecognized identifier" red squiggle.

My FormatString function (in the rdl file) is this:


Public Shared Function FormatString(ByVal Decimals as object) As String
dim format = "N0"
if not (Decimals is nothing or Decimals is System.DBNull.Value) then
dim decs as integer
decs = Convert.ToInt32(Decimals)
if decs>0 then
format = "N"+decs.ToString()
end if
end if
return format
End Function

What's wrong with this?


Luis
   

- Advertisement -