Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 How to represent self-referencing table?

Author  Topic 

wgpubs
Yak Posting Veteran

67 Posts

Posted - 2005-03-07 : 12:36:19
I have the following self-referencing Category table:

CategoryID INT
ParentCategoryID INT NULL
CategoryName VARCHAR(20)

I would like to display a count of the products sold for each category as follows:

Category Count
---------------------------- ---------------
- All Categories 1000999
+ Apparel 898
+ Pets 2345
+ Automotive 3333
- Games 34323
+ Horror 3234
+ Fantasy 2
- Sports 100
PlayStation 75
Xbox 24
Nintendo 1

I want to toggle visibility as indicated above but I'm having a tough time figuring out how to do this in RS given that the Category table supports an nth degree of levels.

Any ideas? Thanks - wg

XericCoder
Starting Member

12 Posts

Posted - 2005-03-15 : 12:07:21
I don't have the time to plagiarize the text, but I saw this sort of problem with Recursive Data specifically addressed on page 134 of the WROX book "Professional SQL Server Reporting Services". They didn't exactly address the problem with the +-, but that is somewhere else in the book.

Although I didn't look for/see that problem specifically in the book "Hitchhikers Guide to Reporting Services", purchasing that book gives you access to a forum that the author of the book replies to sporadically.
Go to Top of Page
   

- Advertisement -