SSRS 2008: chart title with multiple parameters
Hi Friends, I am working on the TFS reports, here I meet one problem, don't know how to solve it, and need your help. In the chart title, I used the parameter labels in it and used switch function to show the parameter labels in abbreviations, it's succeeded. the expression for the chart title is like this: ="MSN"+" "+Parameters!WorkItemIterationHierarchy.Label+" "+"Bug Metrics for"+" "+ Switch(Parameters!WorkItemAreaHierarchy.Label="(ABC Rxxxxxx)","ABC Rxxxxxx", Parameters!WorkItemAreaHierarchy.Label="Cxxxxx Nxxx Pxxxxxxx (CNP)","CNP", Parameters!WorkItemAreaHierarchy.Label="Dxx Gxx Kxxxx (DGK)","DGK", Parameters!WorkItemAreaHierarchy.Label="Example","Example") Then the chart title show as "MSN Wave 16 Bug Metrics for CNP", it looks good. But now the requirement is changed, for the above I can only select one value for parameter WorkItemAreaHierarchy, now I want to select multiple values, still I need to show the parameters in abbreviations, I checked "allow multiple values" in the parameter properties pane, and used join function in the above expression, it shows me error in the chart title. I want the title shows like "MSN Wave 16 Bug Metrics for CNP & DGK",The expression now is: ="MSN"+" "+Parameters!WorkItemIterationHierarchy.Label+" "+"Bug Metrics for"+" "+ Join(Switch(Parameters!WorkItemAreaHierarchy.Label="(ABC Rxxxxxx)","ABC Rxxxxxx", Parameters!WorkItemAreaHierarchy.Label="Cxxxxx Nxxx Pxxxxxxx (CNP)","CNP", Parameters!WorkItemAreaHierarchy.Label="Dxx Gxx Kxxxx (DGK)","DGK", Parameters!WorkItemAreaHierarchy.Label="Example","Example")," & ") below is the error info: [rsRuntimeErrorInExpression] The Caption expression for the chart Chart3 contains an error: Overload resolution failed because no Public '=' can be called with these arguments: 'Public Shared Operator =(a As String, b As String) As Boolean': Argument matching parameter 'a' cannot convert from 'String()' to 'String'. Do you know how can I satisfy the requirement?Thanks! Best Regards. Connie Zhu
December 21st, 2010 1:06am

This might not be an elegant solution but might do the trick... Not sure whether the number of brackets are correct, just check. ="MSN"+" "+Parameters!WorkItemIterationHierarchy.Label+" "+"Bug Metrics for"+" "+ Join(Replace(Replace(Replace(Replace(Parameters!WorkItemAreaHierarchy.Label,"(ABC Rxxxxxx)","ABC Rxxxxxx"), "Cxxxxx Nxxx Pxxxxxxx (CNP)","CNP"), "Dxx Gxx Kxxxx (DGK)","DGK"), "Example","Example")," & ")Cheers, Jason P.S. : Please click the 'Mark as Answer' button if a post solves your problem! :)
Free Windows Admin Tool Kit Click here and download it now
December 21st, 2010 1:29am

Hi Jason, Thank you for your reply. I did it as your suggestion, but I didn't get the result I want, it still shows the error. the error info is like below: [rsCompilerErrorInExpression] The Caption expression for the chart Chart4 contains an error: [BC30518] Overload resolution failed because no accessible 'Join' can be called with these arguments: Build complete -- 1 errors, 0 warnings Best Regards.Connie Zhu
December 21st, 2010 1:54am

Try by reversing the order of join and replace ="MSN"+" "+Parameters!WorkItemIterationHierarchy.Label+" "+"Bug Metrics for"+" "+ Replace(Replace(Replace(Replace(Join(Parameters!WorkItemAreaHierarchy.Label," & "),"(ABC Rxxxxxx)","ABC Rxxxxxx"), "Cxxxxx Nxxx Pxxxxxxx (CNP)","CNP"), "Dxx Gxx Kxxxx (DGK)","DGK"), "Example","Example") Cheers, Jason P.S. : Please click the 'Mark as Answer' button if a post solves your problem! :)
Free Windows Admin Tool Kit Click here and download it now
December 21st, 2010 9:45pm

Hi Jason, It's so great that it's working. :-) Thank you so much for your help. Best Regards. Connie Zhu
December 21st, 2010 9:56pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics