July 14, 2009 at 6:05 am
I like to show the data in tree view. Is it possible in SSRS?
July 14, 2009 at 9:09 am
I believe you could mimic a tree view using a table with groups and have the data be collapsed (hidden) below the top group with a toggle on each group.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
July 14, 2009 at 9:25 am
Thanks Jack.
I'll give a try and come back to you.
Thanks for your response
July 15, 2009 at 6:04 am
Hi Jack Corbett,
Will you please give me any example or samples ?.
July 15, 2009 at 8:43 am
Can you post some sample data? Please see the top article in my signature for how to post the sample data.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
July 16, 2009 at 12:37 am
Hi jack .
Kindly execute the following procedure taht will create a sample data for Tree View in your database.
I also attached the screen shot of what output i'm getting and what i'm expecting.
Kindly look into that and please help me.
create procedure ProTreeView
as
begin
--If the test table already exists, drop it
IF OBJECT_ID('TblTreeview','U') IS NOT NULL
DROP TABLE TblTreeview
--Creating table
create table TblTreeview ([Id] int, [Name] varchar(100), [ParentId] int)
-- Inserting Sample record
INSERT INTO TblTreeview ([Id], [Name], [ParentId])
SELECT 1,'Mobile',0 UNION ALL
SELECT 2,'Nokia',1 UNION ALL
SELECT 3,'Sony Ericssion',1 UNION ALL
SELECT 4,'1100',2 UNION ALL
SELECT 5,'5310',2 UNION ALL
SELECT 6,'6233',2 UNION ALL
SELECT 7,'W500i',3 UNION ALL
SELECT 8,'K550i',3 UNION ALL
SELECT 9,'5610',2
--View the table
select * from TblTreeview
end
July 16, 2009 at 8:07 am
Here's an idea. Report uses AdventureWorks, but you can change it, and it has no formatting. I just set the visibility properties.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
July 17, 2009 at 9:36 am
I "tweeked" Jack's attached report example to look a little closer to a treeview.
--Pete
July 19, 2009 at 9:51 pm
Jack.. Thanks a lot.. I'll try it and let you know. thanks for your great effort Jack
July 20, 2009 at 6:38 am
Excellent peterzeke & Jack
This is what i need.. Good work. Thanks a ton
December 22, 2010 at 4:58 am
is it for dynamic tree? if you increase or decrease the level of tree what happen then ?
December 22, 2010 at 6:53 am
abidsikandar (12/22/2010)
is it for dynamic tree? if you increase or decrease the level of tree what happen then ?
The sample report that Jack & I shared merely achieves "the look" of a treeview. If more levels are added or removed, then the corresponding number of groups in the table will need to be added/deleted. It's a bit brute force, but useable if the number of levels are already known and not likely to change frequently. Since I haven't had much need for this exact type of report, I haven't spent any additional time considering how to make the report dynamic -- which would certainly be ideal.
--pete
December 23, 2010 at 12:34 pm
Thanks
Viewing 13 posts - 1 through 12 (of 12 total)
You must be logged in to reply to this topic. Login to reply