Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Toggle Reports in BIRT
Toggle Reports in BIRT [message #525881] Thu, 08 April 2010 07:31 Go to next message
sen K is currently offline sen KFriend
Messages: 28
Registered: April 2010
Junior Member
Hi all,

I would like to know BIRT is supporting Toggle Reports.
If it support toggle reports, can I have some example / URL to know how can I achieve it.

For more details - some report heading with " + " symbol, when i click on " + " symbol it can able to load the report that time the header will shows " - ".Collaspse and expand will happen when click on +.

can any one help me out to achieve this.

I appricate the help.

Thanks
Sen
Re: Toggle Reports in BIRT [message #526092 is a reply to message #525881] Thu, 08 April 2010 16:10 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Sen,

Do you mean like:
http://www.birt-exchange.org/devshare/designing-birt-reports /1126-collapse-groups-client-side/#description

Jason

sen K wrote:
> Hi all,
>
> I would like to know BIRT is supporting Toggle Reports.
> If it support toggle reports, can I have some example / URL to know how
> can I achieve it.
>
> For more details - some report heading with " + " symbol, when i click
> on " + " symbol it can able to load the report that time the header will
> shows " - ".Collaspse and expand will happen when click on +.
> can any one help me out to achieve this.
>
> I appricate the help.
>
> Thanks
> Sen
Re: Toggle Reports in BIRT [message #526517 is a reply to message #526092] Mon, 12 April 2010 06:33 Go to previous messageGo to next message
sen K is currently offline sen KFriend
Messages: 28
Registered: April 2010
Junior Member
Hi Jason,

Thanks for your reply.

There was a version conflict in my end,due to this I am not able to load the example report.

Xmlns version we are using is - version="3.2.17"
and Eclipse BIRT Designer Version 2.3.2.r232_v20090521.

But the sample report was created using higher version of both xmlns version="3.2.20" and Eclipse BIRT Designer Version 2.5.1.v20090903.

Please let me know whether - Eclipse BIRT Designer Version 2.3.2.r232_v20090521 can able to generate the collapse report design orelse I have to go for the higher version Eclipse BIRT Designer Version 2.5.1.v20090903.
to acheive collaspe report design in our application.

Regards
Sen k
Re: Toggle Reports in BIRT [message #526697 is a reply to message #526517] Mon, 12 April 2010 15:50 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Here is an older version. I do not remember all the changes that were
made for the newer one, but it was based on this example.

Jason

<?xml version="1.0" encoding="UTF-8"?>
<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.17"
id="1">
<property name="createdBy">Eclipse BIRT Designer Version
2.3.2.r232_20090202 Build &lt;2.3.2.v20090218-0730></property>
<property name="units">in</property>
<property name="comments">Copyright (c) 2007 &lt;&lt;Your Company
Name here>></property>
<html-property name="description">Creates a blank report with no
predefined content.</html-property>
<method
name="beforeFactory"><![CDATA[reportContext.setPersistentGlobalVariable( "rorder",
"");]]></method>
<text-property name="displayName">Blank Report</text-property>
<property name="iconFile">/templates/blank_report.gif</property>
<data-sources>
<oda-data-source
extensionID="org.eclipse.birt.report.data.oda.jdbc" name="Data Source"
id="6">
<property
name="odaDriverClass">org.eclipse.birt.report.data.oda.sampledb.Driver </property>
<property name="odaURL">jdbc:classicmodels:sampledb</property>
<property name="odaUser">ClassicModels</property>
</oda-data-source>
</data-sources>
<data-sets>
<oda-data-set
extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet "
name="Data Set" id="7">
<structure name="cachedMetaData">
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">ORDERNUMBER</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">PRODUCTCODE</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">QUANTITYORDERED</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">4</property>
<property name="name">PRICEEACH</property>
<property name="dataType">float</property>
</structure>
<structure>
<property name="position">5</property>
<property name="name">ORDERLINENUMBER</property>
<property name="dataType">integer</property>
</structure>
</list-property>
</structure>
<property name="dataSource">Data Source</property>
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">ORDERNUMBER</property>
<property name="nativeName">ORDERNUMBER</property>
<property name="dataType">integer</property>
<property name="nativeDataType">4</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">PRODUCTCODE</property>
<property name="nativeName">PRODUCTCODE</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">QUANTITYORDERED</property>
<property name="nativeName">QUANTITYORDERED</property>
<property name="dataType">integer</property>
<property name="nativeDataType">4</property>
</structure>
<structure>
<property name="position">4</property>
<property name="name">PRICEEACH</property>
<property name="nativeName">PRICEEACH</property>
<property name="dataType">float</property>
<property name="nativeDataType">8</property>
</structure>
<structure>
<property name="position">5</property>
<property name="name">ORDERLINENUMBER</property>
<property name="nativeName">ORDERLINENUMBER</property>
<property name="dataType">integer</property>
<property name="nativeDataType">5</property>
</structure>
</list-property>
<property name="queryText">select *
from orderdetails
</property>
</oda-data-set>
<oda-data-set
extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet "
name="Data Set1" id="59">
<structure name="cachedMetaData">
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">ORDERNUMBER</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">ORDERDATE</property>
<property name="dataType">date</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">REQUIREDDATE</property>
<property name="dataType">date</property>
</structure>
<structure>
<property name="position">4</property>
<property name="name">SHIPPEDDATE</property>
<property name="dataType">date</property>
</structure>
<structure>
<property name="position">5</property>
<property name="name">STATUS</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">6</property>
<property name="name">COMMENTS</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">7</property>
<property name="name">CUSTOMERNUMBER</property>
<property name="dataType">integer</property>
</structure>
</list-property>
</structure>
<property name="dataSource">Data Source</property>
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">ORDERNUMBER</property>
<property name="nativeName">ORDERNUMBER</property>
<property name="dataType">integer</property>
<property name="nativeDataType">4</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">ORDERDATE</property>
<property name="nativeName">ORDERDATE</property>
<property name="dataType">date</property>
<property name="nativeDataType">91</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">REQUIREDDATE</property>
<property name="nativeName">REQUIREDDATE</property>
<property name="dataType">date</property>
<property name="nativeDataType">91</property>
</structure>
<structure>
<property name="position">4</property>
<property name="name">SHIPPEDDATE</property>
<property name="nativeName">SHIPPEDDATE</property>
<property name="dataType">date</property>
<property name="nativeDataType">91</property>
</structure>
<structure>
<property name="position">5</property>
<property name="name">STATUS</property>
<property name="nativeName">STATUS</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
<structure>
<property name="position">6</property>
<property name="name">COMMENTS</property>
<property name="nativeName">COMMENTS</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
<structure>
<property name="position">7</property>
<property name="name">CUSTOMERNUMBER</property>
<property name="nativeName">CUSTOMERNUMBER</property>
<property name="dataType">integer</property>
<property name="nativeDataType">4</property>
</structure>
</list-property>
<property name="queryText">select *
from orders</property>
</oda-data-set>
</data-sets>
<styles>
<style name="crosstab" id="4">
<property name="borderBottomColor">#CCCCCC</property>
<property name="borderBottomStyle">solid</property>
<property name="borderBottomWidth">1pt</property>
<property name="borderLeftColor">#CCCCCC</property>
<property name="borderLeftStyle">solid</property>
<property name="borderLeftWidth">1pt</property>
<property name="borderRightColor">#CCCCCC</property>
<property name="borderRightStyle">solid</property>
<property name="borderRightWidth">1pt</property>
<property name="borderTopColor">#CCCCCC</property>
<property name="borderTopStyle">solid</property>
<property name="borderTopWidth">1pt</property>
</style>
<style name="crosstab-cell" id="5">
<property name="borderBottomColor">#CCCCCC</property>
<property name="borderBottomStyle">solid</property>
<property name="borderBottomWidth">1pt</property>
<property name="borderLeftColor">#CCCCCC</property>
<property name="borderLeftStyle">solid</property>
<property name="borderLeftWidth">1pt</property>
<property name="borderRightColor">#CCCCCC</property>
<property name="borderRightStyle">solid</property>
<property name="borderRightWidth">1pt</property>
<property name="borderTopColor">#CCCCCC</property>
<property name="borderTopStyle">solid</property>
<property name="borderTopWidth">1pt</property>
</style>
<style name="detail" id="56">
<property name="backgroundColor">#BACAE2</property>
<property name="fontFamily">"Arial"</property>
<property name="fontSize">small</property>
<property name="paddingTop">0px</property>
<property name="paddingLeft">0px</property>
<property name="paddingBottom">0px</property>
<property name="paddingRight">0px</property>
</style>
<style name="headerfooter" id="57">
<property name="backgroundColor">#004080</property>
<property name="fontFamily">"Arial"</property>
<property name="fontSize">small</property>
<property name="fontWeight">bold</property>
<property name="color">#FFFFFF</property>
</style>
<style name="groupheader" id="58">
<property name="backgroundColor">#0080FF</property>
<property name="fontFamily">"Arial"</property>
<property name="fontSize">small</property>
<property name="fontWeight">bold</property>
<property name="color">#FFFFFF</property>
<property name="borderBottomColor">#FFFFFF</property>
<property name="borderBottomStyle">solid</property>
<property name="borderTopColor">#FFFFFF</property>
<property name="borderTopStyle">solid</property>
</style>
</styles>
<page-setup>
<simple-master-page name="Simple MasterPage" id="2">
<page-footer>
<text id="3">
<property name="contentType">html</property>
<text-property
name="content"><![CDATA[<value-of>new Date()</value-of>]]></text-property>
</text>
</page-footer>
</simple-master-page>
</page-setup>
<body>
<text id="134">
<property name="contentType">html</property>
<text-property name="content"><![CDATA[<script>
function hidetable(form, ord, rwcnt){

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

//alert(ord);
if( document.getElementById(btnstr).value == '-'){
document.getElementById(btnstr).value = "+";
hide=true;
}else{
document.getElementById(btnstr).value = "-";
hide=false;
}


for( i=1; i<= rwcnt; i++ ){
var drow = ord+""+i;
if( document.getElementById(drow)){
if( hide ){
//alert( document.getElementById(drow).style );
document.getElementById(drow).style.display = 'none';
}else{
//alert( document.getElementById(drow).style );
document.getElementById(drow).style.display = '';
}
}
}



}

</script>]]></text-property>
</text>
<table id="8">
<property name="width">100%</property>
<property name="dataSet">Data Set</property>
<list-property name="boundDataColumns">
<structure>
<property name="name">ORDERNUMBER</property>
<expression
name="expression">dataSetRow["ORDERNUMBER"]</expression >
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">PRODUCTCODE</property>
<expression
name="expression">dataSetRow["PRODUCTCODE"]</expression >
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">QUANTITYORDERED</property>
<expression
name="expression">dataSetRow["QUANTITYORDERED"]</expression >
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">PRICEEACH</property>
<expression
name="expression">dataSetRow["PRICEEACH"]</expression>
<property name="dataType">float</property>
</structure>
<structure>
<property name="name">ORDERLINENUMBER</property>
<expression
name="expression">dataSetRow["ORDERLINENUMBER"]</expression >
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">Aggregation</property>
<property name="displayName">grpcnt</property>
<expression
name="expression">dataSetRow["ORDERLINENUMBER"]</expression >
<property name="dataType">any</property>
<simple-property-list name="aggregateOn">
<value>Order</value>
</simple-property-list>
<property name="aggregateFunction">count</property>
</structure>
</list-property>
<property name="pageBreakInterval">50</property>
<list-property name="sort">
<structure>
<expression
name="key">row["ORDERLINENUMBER"]</expression>
<property name="direction">asc</property>
</structure>
</list-property>
<column id="37">
<property name="width">1.0520833333in</property>
</column>
<column id="38">
<property name="width">1.1145833333in</property>
</column>
<column id="39"/>
<column id="40"/>
<column id="41"/>
<header>
<row id="9">
<property name="style">headerfooter</property>
<cell id="10">
<label id="11">
<text-property
name="text">ORDERNUMBER</text-property>
</label>
</cell>
<cell id="12">
<label id="13">
<text-property
name="text">PRODUCTCODE</text-property>
</label>
</cell>
<cell id="14">
<label id="15">
<text-property
name="text">QUANTITYORDERED</text-property>
</label>
</cell>
<cell id="16">
<label id="17">
<text-property
name="text">PRICEEACH</text-property>
</label>
</cell>
<cell id="18">
<label id="19">
<text-property
name="text">ORDERLINENUMBER</text-property>
</label>
</cell>
</row>
</header>
<group id="42">
<property name="groupName">Order</property>
<property name="interval">none</property>
<property name="sortDirection">asc</property>
<expression name="keyExpr">row["ORDERNUMBER"]</expression>
<structure name="toc">
<expression name="expressionValue">"Order Number
"+row["ORDERNUMBER"]</expression>
<property name="TOCStyle">groupheader</property>
</structure>
<property name="repeatHeader">true</property>
<property name="hideDetail">false</property>
<property name="pageBreakAfter">auto</property>
<property name="pageBreakBefore">auto</property>
<property name="pageBreakInside">auto</property>
<header>
<row id="43">
<expression
name="bookmark">row["ORDERNUMBER"]</expression>
<property name="style">groupheader</property>
<cell id="44"/>
<cell id="45"/>
<cell id="46"/>
<cell id="47"/>
<cell id="48"/>
</row>
<row id="120">
<property name="height">0.438in</property>
<property name="style">groupheader</property>
<cell id="121">
<property name="colSpan">2</property>
<property name="rowSpan">1</property>
<text id="80">
<property
name="contentType">html</property>
<text-property
name="content"><![CDATA[<form>


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

</form>]]></text-property>
</text>
</cell>
<cell id="123">
<property name="colSpan">3</property>
<property name="rowSpan">1</property>
</cell>
</row>
</header>
<footer>
<row id="126">
<list-property name="visibility">
<structure>
<property name="format">all</property>
<expression
name="valueExpr">true</expression>
</structure>
</list-property>
<cell id="127">
<label id="132">
<text-property name="text">This row is
hidden</text-property>
</label>
</cell>
<cell id="128"/>
<cell id="129"/>
<cell id="130"/>
<cell id="131">
<data id="113">
<property
name="resultSetColumn">Aggregation</property>
</data>
</cell>
</row>
</footer>
</group>
<detail>
<row id="100">
<expression name="bookmark">row["ORDERNUMBER"]+ ""
+row["ORDERLINENUMBER"];</expression>
<method
name="onRender"><![CDATA[this.getStyle().display = 'none';]]></method>
<property name="style">detail</property>
<cell id="101">
<data id="133">
<property
name="resultSetColumn">ORDERNUMBER</property>
</data>
</cell>
<cell id="102">
<data id="24">
<property name="textAlign">center</property>
<property
name="resultSetColumn">PRODUCTCODE</property>
</data>
</cell>
<cell id="103">
<data id="26">
<property name="textAlign">center</property>
<property
name="resultSetColumn">QUANTITYORDERED</property>
</data>
</cell>
<cell id="104">
<data id="28">
<property name="textAlign">center</property>
<property
name="resultSetColumn">PRICEEACH</property>
</data>
</cell>
<cell id="105">
<data id="30">
<property name="textAlign">center</property>
<expression
name="bookmark">row["ORDERLINENUMBER"]</expression>
<property
name="resultSetColumn">ORDERLINENUMBER</property>
</data>
</cell>
</row>
</detail>
<footer>
<row id="31">
<property name="style">headerfooter</property>
<cell id="32"/>
<cell id="33"/>
<cell id="34"/>
<cell id="35"/>
<cell id="36"/>
</row>
</footer>
</table>
</body>
</report>


sen K wrote:
> Hi Jason,
>
> Thanks for your reply.
>
> There was a version conflict in my end,due to this I am not able to load
> the example report.
>
> Xmlns version we are using is - version="3.2.17" and Eclipse BIRT
> Designer Version 2.3.2.r232_v20090521.
>
> But the sample report was created using higher version of both xmlns
> version="3.2.20" and Eclipse BIRT Designer Version 2.5.1.v20090903.
>
> Please let me know whether - Eclipse BIRT Designer Version
> 2.3.2.r232_v20090521 can able to generate the collapse report design
> orelse I have to go for the higher version Eclipse BIRT Designer Version
> 2.5.1.v20090903.
> to acheive collaspe report design in our application.
>
> Regards
> Sen k
>
Re: Toggle Reports in BIRT [message #526942 is a reply to message #526697] Tue, 13 April 2010 14:35 Go to previous message
sen K is currently offline sen KFriend
Messages: 28
Registered: April 2010
Junior Member
Jason,

Thanks alot for your help.with this example I can handle wiht toggle report.

Regards
Sen
Previous Topic:div around a table/auto scroll area
Next Topic:Getting parameter values from JSP
Goto Forum:
  


Current Time: Fri Apr 19 20:28:12 GMT 2024

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

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

Back to the top