Tuesday, October 28, 2008

SQL Server 2005 Report Builder - displaying prompted parameter values

This has already been covered off long ago by
http://blogs.msdn.com/bobmeyers/archive/2006/03/26/561147.aspx

=String.Format("Sales Year: {0}", Parameters!OrderYear.Value)

But if you get System.Object[] as the returned value, this is because the parameter is multivalued.

The solution is on this page:
http://msdn.microsoft.com/en-us/library/ms157328(SQL.90).aspx

=String.Format("Sales Year: {0}", Join(Parameters!OrderYear.Value))

The Join function concatenates all the parameter values into a single string.