Treeview in SSRS

  • I like to show the data in tree view. Is it possible in SSRS?

    -----------------------------------------------------------------------------------------------------------------------------------------------------------
    Please feel free to let me know if you are not clear or I’ve misunderstood anything.

    Thanks,
    Arunkumar S P

  • 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

  • Thanks Jack.

    I'll give a try and come back to you.

    Thanks for your response

    -----------------------------------------------------------------------------------------------------------------------------------------------------------
    Please feel free to let me know if you are not clear or I’ve misunderstood anything.

    Thanks,
    Arunkumar S P

  • Hi Jack Corbett,

    Will you please give me any example or samples ?.

    -----------------------------------------------------------------------------------------------------------------------------------------------------------
    Please feel free to let me know if you are not clear or I’ve misunderstood anything.

    Thanks,
    Arunkumar S P

  • 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

  • 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

    -----------------------------------------------------------------------------------------------------------------------------------------------------------
    Please feel free to let me know if you are not clear or I’ve misunderstood anything.

    Thanks,
    Arunkumar S P

  • 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

  • I "tweeked" Jack's attached report example to look a little closer to a treeview.

    --Pete

  • Jack.. Thanks a lot.. I'll try it and let you know. thanks for your great effort Jack

    -----------------------------------------------------------------------------------------------------------------------------------------------------------
    Please feel free to let me know if you are not clear or I’ve misunderstood anything.

    Thanks,
    Arunkumar S P

  • Excellent peterzeke & Jack

    This is what i need.. Good work. Thanks a ton

    -----------------------------------------------------------------------------------------------------------------------------------------------------------
    Please feel free to let me know if you are not clear or I’ve misunderstood anything.

    Thanks,
    Arunkumar S P

  • is it for dynamic tree? if you increase or decrease the level of tree what happen then ?

  • 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

  • Thanks

Viewing 13 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic. Login to reply