I am working on SSRS report
where user!userid
variable coming with 3 pipe delimited values
E.g :
ReportUser |500|100
I split the values using below expression
=(Split(Parameters!QueryString.Value, "|")).GetValue(0)
=(Split(Parameters!QueryString.Value, "|")).GetValue(1)
=(Split(Parameters!QueryString.Value, "|")).GetValue(2)
When the parameter
is coming with values above expression works fine. But, when any parameter coming as blank
, I am getting below below error during report execution
.
index was outside bounds of array for the parameter.
I tried below workarounds with iif expression
=iif((Split(Parameters!QueryString.Value, "|")).GetValue(0)=NOTHING,0,
(Split(Parameters!QueryString.Value, "|")).GetValue(0))
=iif((Split(Parameters!QueryString.Value, "|")).GetValue(0)="",0,
(Split(Parameters!QueryString.Value, "|")).GetValue(0))
Still I am getting the same error. Could someone help how to handle the blank values
with this expression?