April 22, 2008 at 4:00 am
=Splt(Fields!Address.Value,",",-1)
when im exacuting above statement in SSRS it is giving following error
#Error
Give me the solution
April 22, 2008 at 6:53 am
First, there seems to be a typo; 'Split' is the correct spelling and not 'Splt'.
Second, You can not use a Split directly to put as a value.
What it does, it splits a string into pieces depending upon the character you have specified(in your case a comma)
So in order to utilize the Split string,you must pass the index to get the split string at that place e.g.
=Split(Fields!Address.Value,",")(0).ToString() will return the 1st value OR
=Split(Fields!Address.Value,",")(1).ToString() will return the second.....
December 21, 2009 at 2:53 am
Try this
Fields!Address.Value.ToString().Split(":")(0) 🙂
December 25, 2009 at 7:09 pm
Round brackets and no square brackets should be used. If you want the first occurence of the array use:
=Split(Fields!Recurrence_Pattern.Value.ToString(),",")(0)
As you alwasy need to ask question and wait others' answer, I think maybe you can have a try of RAQ Report. It is free and you can get detailed user manual in the installation directory.
The explanation of the split function of it is shown below:
Syntax:
split( srcExp,sepExp{,boolExp})
Argument:
srcExp The string to be split.
sepExp The separator.
boolExp The parameter option which decides whether to split with the separator between two quotation marks, or brackets. True means to split, while false means not. The default value is false.
Examples:
(1) =split(”ab;cd;ef;tg;tt”,”;”) The return value is ["ab","cd","ef","tg","tt"].
(2) =split(”ab;c’d;e’f;tg;tt”,”;”,false) The return value is ["ab","c'd;e'f","tg","tt"].
(3) =split(”ab;c[d;e]f;tg;tt”,”;”,true) The return value is ["ab","c[d","e]f”,”tg”,”tt”].
If you want, you can get a free edition at http://www.raqsoft.com/download/install-package/.
I wish this can help.
Regards,
becklery.
December 25, 2009 at 9:18 pm
satishthota (4/22/2008)
Give me the solution
I don't know... maybe it's just me or maybe it's just a language barrier thing but that seems awfully rude in any language.
--Jeff Moden
Change is inevitable... Change for the better is not.
September 2, 2010 at 8:15 am
=SPLIT(REPLACE(Join(Parameters!PersonStatus.Value,","),"[Student]","[Headcount Person]"),",")
great solution!
cheers,
Ferruccio Guicciardi
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply