ltsai
ltsai

Reputation: 757

SSRS Multi Level List

I am trying to set up a list with multiple levels. I am having troubles setting up my data to do so and was wondering if someone could provide some suggestions.

My List of data:

| Part # | Previous Part # |
----------------------------
Part1
Sub-Part1         Part1
Sub-Sub-Part1     Sub-Part1
Part2
Sub-Part2         Part2
Part3
Part4
Part5
Sub-Part5         Part5

What I am looking for is a list like below:

Part1
  Sub-Part1
     Sub-Sub-Part1
Part2
  Sub-Part2
Part3
Part4
Part5
  Sub-Part5

What I am currently getting in SSRS is an exact copy of my list of data. The Part# shows up multiple times for each assembly.

How would I set up my data in order to achieve the result described above?

Thanks!

Upvotes: 1

Views: 667

Answers (1)

Ian Preston
Ian Preston

Reputation: 39586

Assuming this is SSRS 2008 or above, you can use Hierarchy Groups to achieve this.

Some sample data:

enter image description here

As per the MSDN article, set up a group to be based on Part, and set its Recursive parent to be ParentPart:

enter image description here

enter image description here

I have a simple table based on this:

enter image description here

To get the Padding, set the Part textbox Left Padding value to be expression-based:

enter image description here

=CStr(2 + (Level()*10)) + "pt"

Looks like your requirement:

enter image description here

Upvotes: 1

Related Questions