COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: bioCam on 21 Jun 2011 01:02:35 PM

Title: Master/detail report - able to expand/collapse the master row
Post by: bioCam on 21 Jun 2011 01:02:35 PM
Hi, I have to create a master/detail report.  This is not a drill through.  The user wants the option to see Continent data and if so desired, click on the (+) to expand the Continent's country details and then do something to collapse the country details and show the continent only.

For example, a row of data = Continent/Country, Sales, Quantity etc..  Append to the Continent a '(+) ' symbol so the user can click on to expand and display all the countries and its information within the Continent. 

I am not sure what and how I should begin.  Could anyone please who knows direct me to view a sample of how it can be done?

Example:
----------------------------------------------------------------------------
Continent/Country           Sales (Millon $)            Quantity
----------------------------------------------------------------------------
North America (+)                 10                           50
    Canada                             5                             25
    USA                                   5                             25

Asia                                       5                            30
    India                  etc..
    China                 etc..
    Thailand             etc..
   
Thank you.

Title: Re: Master/detail report - able to expand/collapse the master row
Post by: PRIT AMRIT on 22 Jun 2011 03:31:37 AM
You can create a DMR package for this and make use of Drill up/Drill down functionality as well?
Title: Re: Master/detail report - able to expand/collapse the master row
Post by: hthakkar on 22 Jun 2011 03:56:37 AM
Hi,

I think you can achieve this by using some Java Script in the report.Whenever the user wants to drill down at country level he can click on the (+) icon beside the continent and can view his data at country level.And whenever he wants to revert back to Continent level he can do that too.

Do let me know if you need any further clarification on the same.


Thanks,
Hitesh

hthakkar@infocepts.com|www.infocepts.com
Title: Re: Master/detail report - able to expand/collapse the master row
Post by: Prakash Bhai on 22 Jun 2011 04:29:33 AM
Hi Jing,
I got this pdf. Hope this solves your problem.
Regards,
Ram
Title: Re: Master/detail report - able to expand/collapse the master row
Post by: bioCam on 22 Jun 2011 05:55:18 AM
Thank you all.  My day just started and I will try it out and will post how it goes.
Title: Re: Master/detail report - able to expand/collapse the master row
Post by: bioCam on 22 Jun 2011 07:54:12 AM
okay - i am not getting anywhere lol! Any help please?

Thank you, Ram - I will have to try your solution @ home later.

hthakkar - could you please expand your suggestion?  I would like to try out a small sample to create thsi report..there are only 2 Query Subjects in FM package:-

1)  Continent dimension (continent code, desc )

2)  Fact table (Sales, Quantity, ContinentFK, Country - yes, I know this should in Continent but this is what is available to me now :-\)   

Fact table data looks like:  (10, 50, nContinentFK, '')   (5, 25, nContinentFK, 'Canada')   (5, 25, nContinentFK, 'USA')

Example:
----------------------------------------------------------------------------
Continent/Country           Sales (Millon $)            Quantity
----------------------------------------------------------------------------
North America (+)                 10                           50
    Canada                             5                             25
    USA                                   5                             25
Asia                                       5                            30
    India                  etc..
    China                 etc..
    Thailand             etc..

Thank you.