Join Multivalue Parameter Values Into a String and LTrim Whitespace
hi
in reports print values of paramters used generate report @ top of reports.
i've written report usuing mdx , 1 of parameters multivalue list based on hierachy. problem have when join parameter label values it's bringing through indenting preceeding whitespace. i've been struggling while try , trim off
anyone have suggestions??
=join(parameters.sites.label,", ")
results in
head office, branch 1, subbranch 1 etc
if put =join(ltrim(parameters.sites.label),", ") error
overload resolution failed because no accessible 'join' can called these arguments
cheers
matt
after bit more searching clear wasn't going possible directly functions expression editor instead used custom code as described in post
http://www.sqlservercentral.com/forums/topic647539-147-1.aspx
public function jointrim(myarray as object) as string dim returnstring as string, item as string, firstitem as boolean = true for each item in myarray if firstitem = true returnstring = trim(item) else returnstring = returnstring + ", " + trim(item) end if firstitem = false next item return returnstring end function
you obvioulsy modify adding additional input paramter can specify delimiter 1 hard coded ", "
SQL Server > SQL Server Reporting Services, Power View
Comments
Post a Comment