Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to use a single table database hierarchy with Report Builder?

0 views
Skip to first unread message

C17

unread,
Nov 16, 2009, 12:02:01 PM11/16/09
to
I have a table called “Units” that contains a single-table hierarchy; each
unit has a parent unit except the topmost unit. This is represented in the
table using the standard adjacency model:

UnitID [Primary Key]
UnitDescription
…other fields…
ParentUnitID [‘Points to’ UnitID in this table via a relationship]

For example, here are some rows in the table:
UnitID UnitDescription ParentUnitID
7 Total College NULL
5 Non-Academic Depts 7
12 Academic Depts 7
3 Math Dept 12
14 English Dept 12
65 Chemistry Dept 12

Now, what I want my users to be able to do in Report Builder is to
drill-down through this hierarchy when running a report.

Does anyone know how I can achieve this? Is there something I can do with
the Data Source View or the Report Model that would make it straightforward
for the user?

Thank you,

C17

Todd C

unread,
Nov 17, 2009, 12:50:11 AM11/17/09
to
Check BOL for "common table expressions" and "recursive queries"

Have not built one like this, but have seen samples in magazines and books.

Google author and SQL guru Itzik Ben-Gan.

Good luck.
=====
Todd C

vinuthan

unread,
Nov 23, 2009, 8:39:01 AM11/23/09
to
Hi,

Do you intend browse against the cube or directly the table?
If it is cube, then we could create a parent-child relationship in the cube.
As you drop the hierarchy, u will be able to drill down without any
additional effort

0 new messages