Search code examples
reporting-servicesssrs-2008ssrs-2008-r2ssrs-grouping

SSRS Grouping Data Together


I have a report that lists securities that are held and there security types. I want to some business logic that says security types 1, 2 and 3 are Equities, while security types 4, 5 and 6 are Bonds and then I want to group the report by these. Any idea how to do that? Right now the report lists each individual security type.


Solution

  • amend your dataset: within your select sql statement , lastly add the following:

    CASE WHEN [security types] IN ('1', '2', '3') THEN 'Equities' 
         WHEN [security types] IN ('4', '5', '6') THEN 'Bonds' 
      ELSE 'others' 
    END AS securitiestype
    

    Then with in your SSRS report you can now use securitiestype as a group filter.