Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » collapsable row/group
collapsable row/group [message #988780] Mon, 03 December 2012 07:03 Go to next message
Chris F is currently offline Chris FFriend
Messages: 4
Registered: October 2012
Junior Member
So I'm trying to create a dynamic collpasable group/rows to kind of mimic the grouping/outlining in excel - in a web ui.

Using this example : birt-exchange.org/org/devshare/designing-birt-reports/1126-collapse-groups-client-side/

I like the example, it took me a while to implement, but it doesn't work in Firefox/Chrome. Only in IE. Even the default example, will only work in IE. Anything else shows all rows expanded with a [-] and will not collapse onclick.

I'm using 4.2.1 currently.

I tried modifying the js some to use the visibility css tag but it didn't seem to make a difference.

<form>
<script>
function hidetable(form, ord, rwcnt){

//alert( document.getElementById(ord).style.display  );


var hide = false;
var btnstr = "mybutton"+ord;

if( document.getElementById(ord).style.display == 'block' || document.getElementById(ord).style.display == ""){
	document.getElementById(ord).style.display = 'none';
	document.getElementById(ord).style.visibility = 'hidden';
	document.getElementById(btnstr).value = "+";
	//form.btnstr.value = "+";
	hide = true;
}else{
	document.getElementById(ord).style.display = 'block';
	document.getElementById(ord).style.visibility="visible";
	document.getElementById(btnstr).value = "-";
	//form.btnstr.value = "-";
	hide = false;
}
for( i=0; i< rwcnt; i++ ){
var drow = ord+""+i;
if( document.getElementById(drow)){
	if( hide ){
		document.getElementById(drow).style.display = 'none';
		document.getElementById(drow).style.visibility = 'hidden';
	}else{
		document.getElementById(drow).style.display = 'block';
		document.getElementById(drow).style.visibility="visible";
	}
}
}



}

</script>

<INPUT Type="BUTTON" name=<VALUE-OF>"mybutton"+row["property_id"]</VALUE-OF> Value="-" onClick='hidetable( this.form, <VALUE-OF>row["property_id"]</VALUE-OF>, <VALUE-OF>row["Aggregation"]</VALUE-OF> )'></INPUT> <VALUE-OF>row["property_id"]</VALUE-OF>
<script>
hidetable( this.form, <VALUE-OF>row["property_id"]</VALUE-OF>, <VALUE-OF>row["Aggregation"]</VALUE-OF> );
</script>

</form>



Any suggestions?

Thanks!
Re: collapsable row/group [message #988962 is a reply to message #988780] Tue, 04 December 2012 05:32 Go to previous message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1687
Registered: July 2009
Senior Member

I'll take a look. Here's a drill through way that might work for you, if we don't find a quick solution to this. http://www.birt-exchange.org/org/devshare/designing-birt-reports/1242-expandablecollapsible-groups-by-drill-through/

Michael

Add interactivity, scheduling, sharing, live Excel export, and JS integration to your BIRT app with the new, free BIRT server, BIRT iHub F-Type.
Previous Topic:redirect to another page/url before the parameter window
Next Topic:pdf font missing (non english font)on linux
Goto Forum:
  


Current Time: Sun Dec 21 03:21:41 GMT 2014

Powered by FUDForum. Page generated in 0.07629 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software