Within SQL Server 2005 Reporting Services I am attempting to evaluate an expression which outputs an array which I attempt to pass to my VBScript code with my report.
My parameter values are
BU
MC
CD
DU
The join function correctly outputs the string BU-MC-CD-DU
I then use the split function within an expression to split the values and output as an array as such
=Split(join(Parameters!ReportType.Value,"-"),"-",-1,1)
After which I then pass the array to my VBScript code within the report using the expression below within a textbox :
=Code.debugReportVisible(Split(join(Parameters!ReportType.Value,"-"),"-",-1,1))
My VBScript function is as follows
function debugReportVisible(pSelectedReports() ) as String
dim debug as String
debug = CStr(pSelectedReports(0))
end function
The code does not error but no value is displayed in the textbox.. Can someone tell me why this is?
Many Thanks,
So I ended up just passing the the hypen (-) seperated string to the ‘isReportVisible function’ from my join expression defined for the hidden property of each subreport (for e.g the BU sub report visibility hidden expression is as below)
Hope this helps someone….