I'm trying to display a parameter list of items to a textbox in the header.
Somehow it never evaluates anything after the first item in the array. 1st
below is the expression... 2nd is the custom code. I don't know what I'm
doing wrong...
1.
=code.ParameterList(Parameters!ProgCatCode.value(0))
2.
Public Function ParameterList(ByVal Parameter as Object) as String
Dim sParamItem as Object
Dim sParamVal as String = " "
For Each sParamItem in Parameter
If sParamItem Is Nothing then Exit For
sParamVal &= sParamItem & ", "
Next
Return sParamVal
End FunctionFigured it out..
"gdjoshua" wrote:
> I'm trying to display a parameter list of items to a textbox in the header.
> Somehow it never evaluates anything after the first item in the array. 1st
> below is the expression... 2nd is the custom code. I don't know what I'm
> doing wrong...
> 1.
> =code.ParameterList(Parameters!ProgCatCode.value(0))
> 2.
> Public Function ParameterList(ByVal Parameter as Object) as String
> Dim sParamItem as Object
> Dim sParamVal as String = " "
> For Each sParamItem in Parameter
> If sParamItem Is Nothing then Exit For
> sParamVal &= sParamItem & ", "
> Next
> Return sParamVal
> End Function
>|||What was it that you figured out. Share it with us.
EROK
"gdjoshua" <gdjoshua@.discussions.microsoft.com> wrote in message
news:1D6BB58A-C00C-496C-A675-3FBFBED4E332@.microsoft.com...
> Figured it out..
> "gdjoshua" wrote:
>> I'm trying to display a parameter list of items to a textbox in the
>> header.
>> Somehow it never evaluates anything after the first item in the array.
>> 1st
>> below is the expression... 2nd is the custom code. I don't know what
>> I'm
>> doing wrong...
>> 1.
>> =code.ParameterList(Parameters!ProgCatCode.value(0))
>> 2.
>> Public Function ParameterList(ByVal Parameter as Object) as String
>> Dim sParamItem as Object
>> Dim sParamVal as String = " "
>> For Each sParamItem in Parameter
>> If sParamItem Is Nothing then Exit For
>> sParamVal &= sParamItem & ", "
>> Next
>> Return sParamVal
>> End Function|||I had a similar issue, so I can tell you the things I tried.
1. His primary issue with the custom code was what he was passing into the
function. Parameters!ProgCatCode.value(0) will only give the value at index
0, but Parameters!ProgCatCode.value without the parentethis will pass in the
entire array
2. One way around having to write custom code is to use the Join function.
Join(Parameters!ProgCatCode.value, ", ") gives you all the selected Values.
Join(Parameters!ProgCatCode.label, ", ") gives you all the selected Labels,
which might be better in some cases. Your Value might be numeric data and
meaningless to the user, but the Lable you made to display in your drop down
list might be what the user really wants to see.
"Erok" wrote:
> What was it that you figured out. Share it with us.
> EROK
> "gdjoshua" <gdjoshua@.discussions.microsoft.com> wrote in message
> news:1D6BB58A-C00C-496C-A675-3FBFBED4E332@.microsoft.com...
> > Figured it out..
> >
> > "gdjoshua" wrote:
> >
> >> I'm trying to display a parameter list of items to a textbox in the
> >> header.
> >> Somehow it never evaluates anything after the first item in the array.
> >> 1st
> >> below is the expression... 2nd is the custom code. I don't know what
> >> I'm
> >> doing wrong...
> >>
> >> 1.
> >> =code.ParameterList(Parameters!ProgCatCode.value(0))
> >>
> >> 2.
> >>
> >> Public Function ParameterList(ByVal Parameter as Object) as String
> >> Dim sParamItem as Object
> >> Dim sParamVal as String = " "
> >> For Each sParamItem in Parameter
> >> If sParamItem Is Nothing then Exit For
> >> sParamVal &= sParamItem & ", "
> >> Next
> >> Return sParamVal
> >> End Function
> >>
>
>|||Rob,
sicne the others did not thank you, I'll say it for them.
THANKS!
"Rob 'Spike' Stevens" wrote:
> I had a similar issue, so I can tell you the things I tried.
> 1. His primary issue with the custom code was what he was passing into the
> function. Parameters!ProgCatCode.value(0) will only give the value at index
> 0, but Parameters!ProgCatCode.value without the parentethis will pass in the
> entire array
> 2. One way around having to write custom code is to use the Join function.
> Join(Parameters!ProgCatCode.value, ", ") gives you all the selected Values.
> Join(Parameters!ProgCatCode.label, ", ") gives you all the selected Labels,
> which might be better in some cases. Your Value might be numeric data and
> meaningless to the user, but the Lable you made to display in your drop down
> list might be what the user really wants to see.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment