|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Yesterday @ 6:36 AM
Points: 274,
Visits: 643
|
|
Hello All,
I have a report with the following elements:
- A mutli-valued parameter (@paramBoxSizes), whose data type is Integer - A VB function implemented in the 'Code' section called GetBoxSizeGroup that wants an integer array as one of its input parameters - A tablix with some groups
In one of the Group Expressions in my tablix, I would like enter an expression that passes my mutli-valued parameter values as an array of integers to my VB function.
Unfortunately, I've only been able to find the SPLIT function, which will pass a string array, not an integer array.
=Code.GetBoxSizeGroup(Split(Parameters!paramBoxSizes.Value,","))
I was hoping to avoid having to convert the array inside my VB function from a string array to an integer array. Does anyone have any suggestions?
Many thanks, -Simon
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Yesterday @ 8:36 AM
Points: 2,681,
Visits: 2,423
|
|
I think all you want is
Parameters!paramBoxSizes.Value If you were looking for a single value you would use something like:
Parameters!paramBoxSizes.Value(0)
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Yesterday @ 6:36 AM
Points: 274,
Visits: 643
|
|
Thanks very much for the suggestion, Daniel.
Unfortunately, it fails with the following error:
The GroupExpression expression for the tablix ‘Tablix2’ contains an error: Unable to cast object of type 'System.Object[]' to type 'System.Int32[]'. (rsRuntimeErrorInExpression)
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Yesterday @ 8:36 AM
Points: 2,681,
Visits: 2,423
|
|
If I understand the error you are passing an object rather than an integer array. Unless you can deal with that in your code by taking the object apart and converting it to an integer array, I don't have any additional suggestions.
Good luck.
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Yesterday @ 6:36 AM
Points: 274,
Visits: 643
|
|
| Okay, thanks anyway, Daniel.
|
|
|
|