COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Topic started by: mikegreen on 27 Jan 2006 12:51:01 PM

Title: Expand and Collapse Report Sections Dynamically/On the fly... possible?
Post by: mikegreen on 27 Jan 2006 12:51:01 PM
Is it possible to expand and collapse report areas, such as the detail data below a section/grouped row of data?

Something like this -

On report open this would be displayed:
Sales $10 for Product ABC
Sales $20 for Product DEF
Sales $50 for Product XYZ

Then, the user clicks the row, or a + plus sign or whatever to show this:
Sales $10 for Product ABC
   $5 on 1/1/2006
   $2 on 2/2/2006
   $3 on 3/5/2006
Sales $20 for Product DEF
Sales $50 for Product XYZ

Anyone got any ideas? I cant seem to do it in reportstudio natively.. And my reports are too complex to add in HTML items on each row to do Javascripting.  Although, any Javascript ideas are welcome as maybe I'm doing it wrong.

Thanks!

Mike
Title: [UPDATED]re: Expand and Collapse Report Sections Dynamically
Post by: SueC on 27 Jan 2006 03:24:21 PM
1/31/06 - update - I finally found the handout and it was summary report with detail report drill through example.  Sorry I remembered it wrong.  Sue    :-\

************

I could swear that my Report Studio instructor showed us exactly how to do that and gave us a handout.Ã,  Or it was something very similar.Ã,  I'll see if I can find the handout.Ã, 

Sue
Title: Re: Expand and Collapse Report Sections Dynamically/On the fly... possible?
Post by: mikegreen on 01 Feb 2006 08:13:07 AM
Sue,
  Any luck finding this? If not, can you provide your instructor's name? I'd like to ping them and find out if this is what I could use... I've had no luck so far.  I took one of the early CRN courses in Reston and they didnt have much for cool tips-n-tricks yet :-(

Thanks,

Mike
Title: Re: Expand and Collapse Report Sections Dynamically/On the fly... possible?
Post by: SueC on 01 Feb 2006 09:26:14 AM
I finally found the handout and it was summary report with detail report drill through example.  Sorry I remembered it wrong. 

The instructor is no longer with Cognos.  But I did become good friends with the two pre-sales tech guys who did our pilot.  Let me send your summary to them and see if they can come up with something.  I think it would be really, really cool and could definitely use it myself.  I know they are in the throws of end of the year pilots so I don't know how fast the turnaround will be, but I'll let you know the minute I hear something.

Sue   
Title: Re: Expand and Collapse Report Sections Dynamically/On the fly... possible?
Post by: jolly on 01 Feb 2006 09:53:53 AM
Hi Sue,

I have attached a File with two pictures which will show you a possibility to show or hide a List.  Written in Javascript. Let me know if this is what you are looking for.

Jolly
Title: Re: Expand and Collapse Report Sections Dynamically/On the fly... possible?
Post by: mikegreen on 01 Feb 2006 10:17:54 AM
Jolly,

  Zing! I think that could be tweaked for my purpose. 

  Anyway you could provide code for that?  I'd need to mod it to do for a section rather than the contents of an entire column, but I think I can handle that pretty easily.

  I'll be glad to re-post the modded code for others.

Thanks,

Mike
Title: Re: Expand and Collapse Report Sections Dynamically/On the fly... possible?
Post by: jolly on 02 Feb 2006 12:38:23 AM
Hi Mike,

here it is. Hope that helpÃ,´s a little.

Jolly
Title: Re: Expand and Collapse Report Sections Dynamically/On the fly... possible?
Post by: SueC on 03 Feb 2006 03:12:56 PM
WHOOOOHOOOO!  I'll be givin' that a try.

Thanks Jolly!!!!    :-*
Title: Re: Expand and Collapse Report Sections Dynamically/On the fly... possible?
Post by: bdybldr on 13 Feb 2006 04:08:21 PM
I have a similar issue to this.  I'm creating a psuedo-navigation tree using a RS report.  I created my function to iterate through all the divs and toggle between hiding and showing the top level elements.  However,
I have been unable to dynamically define the individual divs for the items directly under them.  I have 5 levels of data.

Is there a way to dynamically create and name individual divs within each level?

I'm creating a sales force hierarchy (Sales Area, Sales Region, District, Sales Manager, Sales Rep).

Any suggestions would be greatly appreciated.  Thanks.
Title: Re: Expand and Collapse Report Sections Dynamically/On the fly... possible?
Post by: mikegreen on 13 Feb 2006 06:34:55 PM
Quote from: bdybldr on 13 Feb 2006 04:08:21 PM
I have a similar issue to this.  I'm creating a psuedo-navigation tree using a RS report.  I created my function to iterate through all the divs and toggle between hiding and showing the top level elements.  However,
I have been unable to dynamically define the individual divs for the items directly under them.  I have 5 levels of data.

Is there a way to dynamically create and name individual divs within each level?

I'm creating a sales force hierarchy (Sales Area, Sales Region, District, Sales Manager, Sales Rep).

Any suggestions would be greatly appreciated.  Thanks.

What have you tried so far? I think it is as simple as making the HTML tag use a query subject to name the Div ID. 

That sound doable?  I havent been able to dive into this yet, but I was planning on doing similar as I didnt know how many rows I'd need to hide/expand until runtime.

Cheers,

Mike
Title: Re: Expand and Collapse Report Sections Dynamically/On the fly... possible?
Post by: bdybldr on 14 Feb 2006 09:45:39 AM
Quote from: mikegreen on 13 Feb 2006 06:34:55 PM
What have you tried so far? I think it is as simple as making the HTML tag use a query subject to name the Div ID.

Mike,
please explain what you mean by this.  How can this be done?  I haven't found a way to make ReportNet and JavaScript communicate.
Title: Re: Expand and Collapse Report Sections Dynamically/On the fly... possible?
Post by: mikegreen on 14 Feb 2006 10:33:43 AM
Quote from: bdybldr on 14 Feb 2006 09:45:39 AM
Mike,
please explain what you mean by this.  How can this be done?  I haven't found a way to make ReportNet and JavaScript communicate.

Did you look at Jolly's sample above? it would be modifying that to use on a row by row basis.
Title: Re: Expand and Collapse Report Sections Dynamically/On the fly... possible?
Post by: bdybldr on 14 Feb 2006 11:01:59 AM
When I try to open Jolly's file, I get a page cannot be found error.
Title: Re: Expand and Collapse Report Sections Dynamically/On the fly... possible?
Post by: mikegreen on 28 Feb 2006 01:08:31 PM
Jolly - any way you could repost your hide_and_show.txt file? it seems the attachment is no longer linked..

Cheers,

Mike
Title: Re: Expand and Collapse Report Sections Dynamically/On the fly... possible?
Post by: bdybldr on 28 Feb 2006 03:20:45 PM
Mike,
I found an app with a pretty extensive API, called dhtmlxTree.  It allows you to load and wrap an xml file in a navigation tree.  I used this app to build a navigation tree for all sales reps at different levels of the sales hierarchy.  It includes drop-down functionality and expands and collapses.

I also have an iframe next to the nav panel that is populated based on the user's selection in the nav panel.

It works great so far.  The only issue is that I have is to create the xml file with a particular format and since only certain users can view certain parts of the navigation, the xml file has to refresh based on login credentials.

I'm currently working on writing a stored proc to create the xml file for each session based on the user.  Here's the link to the app...  http://www.scriptsearch.com/cgi-bin/jump.cgi?ID=1601
Title: Re: Expand and Collapse Report Sections Dynamically/On the fly... possible?
Post by: jolly on 02 Mar 2006 07:04:19 AM
Hi Mike,

sorry for the delay, but i was in vacation.

Quoteany way you could repost your hide_and_show.txt file? it seems the attachment is no longer linked..

here it is.

Cu jolly
Title: Re: Expand and Collapse Report Sections Dynamically/On the fly... possible?
Post by: bdybldr on 18 May 2006 04:31:25 PM
Will someone please post the sho and hide text file again.  I thought I had it.  I'm not able to download it from here.  Thanks.
Title: Re: Expand and Collapse Report Sections Dynamically/On the fly... possible?
Post by: ejbaron on 26 May 2006 10:29:26 AM
mikegreen,

did you ever get the javascript file?Ã,  You issues sounds similar to one I am experiencing, but I cannot access any of the links in this string.Ã,  Can you repost any solutions you've come up with?Ã,  Much appreciated!
-EB
Title: Re: Expand and Collapse Report Sections Dynamically/On the fly... possible?
Post by: mikegreen on 26 May 2006 12:29:41 PM
Unfortunetly, I dont have the code anymore.. I used it for a report and didnt make a copy.. and have since left that project without a copy of the code :-(

This forum really needs to invest in some infrastructure to support the users - the file attachments going missing is unacceptable...Users get lead to the water but can't drink :-(

Cheers,

Mike
Title: Re: Expand and Collapse Report Sections Dynamically/On the fly... possible?
Post by: mrcool on 12 Jun 2006 01:12:11 AM
Hi all....Plz try 2 repost the attachments....


Thanks,
Mrkwel
Title: Re: Expand and Collapse Report Sections Dynamically/On the fly... possible?
Post by: jolly on 26 Jun 2006 02:10:09 PM
Hi,

a long time ago iÃ,´ve post a message. Okay, here are the Report-Specification for the show an d hide Report again.


Cu Jolly
Title: Re: Expand and Collapse Report Sections Dynamically/On the fly... possible?
Post by: bdybldr on 28 Jun 2006 09:21:20 AM
Thanks for the repost, Jolly.  I'll keep it in a safe place.
Title: Re: Expand and Collapse Report Sections Dynamically/On the fly... possible?
Post by: sandeep on 02 Jun 2007 04:26:11 AM
i cant see ur hide_show file when i click on it, it show page not found error could u plz download it again

thanks & Regards

sandeep
Title: Re: Expand and Collapse Report Sections Dynamically/On the fly... possible?
Post by: COGNOiSe administrator on 02 Jun 2007 12:17:26 PM
I can download just fine, so it must be something on your side.