Showing posts with label Expression. Show all posts
Showing posts with label Expression. Show all posts

Thursday, October 16, 2008

SUM() Function Trick

When using Iif() in SUM() function, make sure data types match. In the example below, if cDec() is not used, you will get an error.

=sum(iif(Fields!Sort_Order.Value = "E1", cDec(Fields!hours_m2.Value), cDec(0)))

The orginal post is at http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1507530&SiteID=1

Thursday, October 9, 2008

Use JOIN() Function to Display All Members of A Multivalue Parameter

Sometimes you want the report to display all the pamameters that are applied, especially when the parameter section is hided. To do that, you can simply use a text box and and point the value to the parameters. However, to display all members of a multiple value parameter, you will need to use the JOIN() function.

For example, if you have a parameter called Area that filters work items by the Area field, the following expression will allow you to display all the selected areas on the report.
="Area: " + JOIN(Parameters!Area.Label, ", ")

Thanks to a post I found on bokebb.com. Here is the link to it:
http://www.bokebb.com/dev/english/2008/posts/2008112686.shtml