views:

37

answers:

2

I have a stored procedure that returns hierarchical data in a single long row, for example:

ContractID | ContractName | AssetID | AssetName | UnitID
-----------+--------------+---------+-----------+-------
2          | Test         | 7       | My asset  | 24
5          | Another one  | 51      | Vehicle   | 89

I need to create an SSRS report that displays the data hierarchically, like this:

ContractID | ContractName
2          | Test
    AssetID | AssetName
    7       | My asset
    UnitID
    24

ContractID | ContractName
5          | Another one
    AssetID | AssetName
    51      | Vehicle
    UnitID
    89

Being an SSRS n00b I'm stumped - is this even possible, and if so, how? If not, what is the best/recommended way to achieve this?

A: 

Assumes "one row with multiple columns" as per my comment

In your table:

  • define a grouping on ContractID/ContractName Look for "Adding Row Groups to a Table" in this link

  • I think you'll need to define another group on AssetID/AssetName I'm assuming multiple UnitID per AssetID/AssetName group

  • UnitID is your detail group

Edit: Sorry: I've not yet worked with SSRS 2008 and Tablix controls.

gbn
A: 

Eventually solved this by using a subreport... nasty, but it works.

Ian Kemp