COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: srinu_anu2007 on 25 Mar 2014 05:35:25 AM

Title: Drill Down with Parent and Child
Post by: srinu_anu2007 on 25 Mar 2014 05:35:25 AM
Hi,

I have a requirement says want to show parent and child and when you again drilldown on child it should show child and subchild in my crosstab. after reading many posts in google it may possible with javascript but i dont know how to handle this one. If anyone having this code please post and would be very helpful. PFA.

I knew it will work with Cognos Workspace Advanced but i want to show in Report Studio(10.2)
Title: Re: Drill Down with Paren and Child
Post by: srinu_anu2007 on 25 Mar 2014 05:37:21 AM
please club with these 2 and see.
Title: Re: Drill Down with Paren and Child
Post by: srinu_anu2007 on 26 Mar 2014 07:36:52 AM
I found many scripts and those are not seems to my requirement and also dont know to change the js code as per my requirement. Can any one help me for my crosstab report
Title: Re: Drill Down with Paren and Child
Post by: srinu_anu2007 on 26 Mar 2014 07:49:16 AM
this is the i got from internet and am placing this one before the data item:<img onclick='ExpandCollapse(this,"A_img")' src='../pat/images/expand_plus.gif' style='cursor:pointer;vertical-align:middle; margin-right:2px'/>
<span onclick='ExpandCollapse(this.parentNode.firstChild,"GroupA")' style='cursor:pointer'>

after the data item: <script>
function ExpandCollapse( el )
{

var tr = el.parentElement.parentElement;

var tbl = tr.parentElement.parentElement;

var sDisplay = ( el.src.indexOf( "minus" ) == -1 ) ? "" :
"none";

el.src = "../pat/images/PropertyGroup_" + ( el.src.indexOf(
"minus" ) == -1 ? "minus" : "plus" ) + ".gif";

for ( var i = tr.rowIndex + 1; i < tbl.rows.length; i++ )

{

var trCurrent = tbl.rows( i );

if ( trCurrent.cells( 1 ).firstChild &&
trCurrent.cells( 1 ).getElementsByTagName( "IMG" ).length )

{

break;

}

trCurrent.style.display = sDisplay;

}
}
</script>

Please see my attached one's and help me.
Title: Re: Drill Down with Paren and Child
Post by: srinu_anu2007 on 28 Mar 2014 03:56:55 AM
Can any one help me?
Title: Re: Drill Down with Parent and Child
Post by: velniaszs on 28 Mar 2014 04:47:18 AM
What you need is Expand-colapse functionality (diffewrent from drill down). You can fake it in report studio with active reports or use javascript.
Title: Re: Drill Down with Parent and Child
Post by: srinu_anu2007 on 01 Apr 2014 10:14:44 AM
Hi,

i am not able to get the JS and my requirement is when you click on drill down any data item, i want to show the parent and child.

Please have a look into my attachments. and kindly help if there is any chances. and i am using report stuido 10.2

Thanks
Title: Re: Drill Down with Parent and Child
Post by: MFGF on 02 Apr 2014 06:31:19 AM
Not sure what exactly you are looking for here, but does this link help?

http://www.cognosonsteroids.com/2012/02/create-report-with-collapsible.html

MF.
Title: Re: Drill Down with Parent and Child
Post by: srinu_anu2007 on 02 Apr 2014 07:37:58 AM
This link i got it but i want to do it in crosstab.