Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Crosstable problem after BIRT 4.2 upgrade
Crosstable problem after BIRT 4.2 upgrade [message #1065823] Thu, 27 June 2013 15:31 Go to next message
David Vinicz is currently offline David Vinicz
Messages: 13
Registered: July 2012
Junior Member
Hi,

I upgraded my BIRT lib from 3.7 to 4.2.2 and now my crosstables created with DE API doesnt work. The problem is the measure doesnt get its content property.
I add the measure to the table with the following code snippet:

MeasureViewHandle mvh = xtabHandle.insertMeasure(measure, 0);


This is before the creation of the dimensions (i tried to put it after them with no luck). And i dont do anything else, this was enough in BIRT 3.7 but in 4.2.2 the data and the binding is not created for the measure.

This is the measure of the generated report:
<property name="measures">
	<extended-item extensionName="MeasureView" id="29">
		<property name="measure">someMeasure3</property>
		<property name="detail">
			<extended-item extensionName="AggregationCell" id="30">
				<property name="aggregationOnRow">some_dimension_03/some_level3</property>
				<property name="aggregationOnColumn">other_dimension_03/other_level3</property>
			</extended-item>
		</property>
		<property name="header">
			<extended-item extensionName="CrosstabCell" id="31">
				<property name="content">
					<label id="32">
						<property name="style">measureHeader</property>
						<text-property name="text">count of measure</text-property>
					</label>
				</property>
			</extended-item>
		</property>
	</extended-item>
</property>


And no binding is created for the measure at all.
Did anything changed in 4.2.2 which i should be aware of ,or my code was completely wrong in 3.7 also and i just had luck that it worked.
Thanks for the help,

David


Re: Crosstable problem after BIRT 4.2 upgrade [message #1065828 is a reply to message #1065823] Thu, 27 June 2013 15:40 Go to previous messageGo to next message
Michael Williams is currently offline Michael Williams
Messages: 1595
Registered: July 2009
Senior Member

Can you set up a simple example that I can run so I can see all you've done and test? Also, 4.3 was released yesterday, you might try it just for grins.

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.
Re: Crosstable problem after BIRT 4.2 upgrade [message #1065939 is a reply to message #1065828] Fri, 28 June 2013 12:21 Go to previous messageGo to next message
David Vinicz is currently offline David Vinicz
Messages: 13
Registered: July 2012
Junior Member
Hi Michael,

Thanks for your fast answer. Actually the code which creates the report is a bit complex , it travels through several classes. So first i think i will try 4.3 and then if its still not working i will try to create a minimal example which can be reproduced. I hoped that i made a trivial mistake (maybe i did but not here:) )
Thanks anyway, i will continue this thread if 4.3 is not a solution,

David
Re: Crosstable problem after BIRT 4.2 upgrade [message #1066756 is a reply to message #1065823] Thu, 04 July 2013 08:53 Go to previous messageGo to next message
David Vinicz is currently offline David Vinicz
Messages: 13
Registered: July 2012
Junior Member
Hi Michael,

Unfortunately the issue is still there in 4.3. I have downloaded a new Eclipse Kepler (with BIRT of course) and tried this report (from another forum post):

<?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>
    <method name="beforeFactory"><![CDATA[importPackage( Packages.org.eclipse.birt.report.model.api );
importPackage( Packages.org.eclipse.birt.report.item.crosstab.core.util);
importPackage( Packages.org.eclipse.birt.report.item.crosstab.core.de);
importPackage( Packages.org.eclipse.birt.report.item.crosstab.core);

try{

		reportDesignHandle = reportContext.getReportRunnable().designHandle.getDesignHandle();
		elementFactory = reportDesignHandle.getElementFactory();
		cubeHandle = reportDesignHandle.getCubes().get(0);


		xtab = CrosstabExtendedItemFactory.createCrosstabReportItem(reportDesignHandle, cubeHandle, "MyCrosstab" );
		reportDesignHandle.getBody().add(xtab);


		reportItem = xtab.getReportItem( );
		xtabHandle = reportItem;

		dimensionX = cubeHandle.getDimension(params["RowDimension"].value);
		dimensionY = cubeHandle.getDimension(params["ColumnDimension"].value);

		levelX = dimensionX.getDefaultHierarchy().getLevel(0)
		levelY = dimensionY.getDefaultHierarchy().getLevel(0)

//Insert X Dimension
		dvh = xtabHandle.insertDimension(dimensionX, ICrosstabConstants.ROW_AXIS_TYPE, 0);
		levelViewHandle =dvh.insertLevel(levelX, 0);
		cellHandle = levelViewHandle.getCell( );
		eii = xtabHandle.getModelHandle( );

		bindingColumn = StructureFactory.newComputedColumn( eii, levelX.getName( ) );
		bindingHandle = eii.addColumnBinding( bindingColumn,false );
		bindingColumn.setDataType( levelX.getDataType( ) );
		exp = "dimension['" + dimensionX.getName()+"']['"+levelX.getName()+"']";
		bindingColumn.setExpression( exp);

		dataHandle = elementFactory.newDataItem( levelX.getName( ) );
		dataHandle.setResultSetColumn( bindingHandle.getName( ) );
		cellHandle.addContent( dataHandle );

//Insert Y Dimension
		dvh = xtabHandle.insertDimension(dimensionY, ICrosstabConstants.COLUMN_AXIS_TYPE, 0);
		levelViewHandle =dvh.insertLevel(levelY, 0);
		cellHandle = levelViewHandle.getCell( );
		eii = xtabHandle.getModelHandle( );

		bindingColumn = StructureFactory.newComputedColumn( eii, levelY.getName( ) );
		bindingHandle = eii.addColumnBinding( bindingColumn,false );
		bindingColumn.setDataType( levelY.getDataType( ) );
		exp = "dimension['" + dimensionY.getName()+"']['"+levelY.getName()+"']";
		bindingColumn.setExpression( exp);

		dataHandle = elementFactory.newDataItem( levelY.getName( ) );
		dataHandle.setResultSetColumn( bindingHandle.getName( ) );
		cellHandle.addContent( dataHandle );



//Measures
		measure = cubeHandle.getMeasure(params["Measure"].value);
		mvh = xtabHandle.insertMeasure(measure, 0);
		
		mvh.getCell().getContents().get(0).setProperty("style", "mydata");		
		
		mvh.addHeader( );
		labelHandle = elementFactory.newLabel( null );
		labelHandle.setText( measure.getName() );
		mvh.getHeader( ).addContent( labelHandle );
//Note that styles are imported so they do not need to be applied		
		
}catch(e){
//importPackage( Packages.java.io );
//out = new PrintWriter( new FileWriter( "c:/test7/xtabevents.txt", true ) );
//out.println(e);
//out.close();
}

]]></method>
    <property name="iconFile">/templates/blank_report.gif</property>
    <property name="bidiLayoutOrientation">ltr</property>
    <parameters>
        <scalar-parameter name="ColumnDimension" id="37">
            <property name="valueType">static</property>
            <property name="dataType">string</property>
            <property name="paramType">simple</property>
            <property name="controlType">list-box</property>
            <property name="mustMatch">true</property>
            <property name="fixedOrder">true</property>
            <property name="distinct">true</property>
            <structure name="format">
                <property name="category">Unformatted</property>
            </structure>
            <list-property name="selectionList">
                <structure>
                    <property name="value">Group</property>
                    <property name="label">Country</property>
                </structure>
                <structure>
                    <property name="value">Group1</property>
                    <property name="label">Product Line</property>
                </structure>
                <structure>
                    <property name="value">Group2</property>
                    <property name="label">Date</property>
                </structure>
            </list-property>
        </scalar-parameter>
        <scalar-parameter name="RowDimension" id="38">
            <property name="valueType">static</property>
            <property name="dataType">string</property>
            <property name="paramType">simple</property>
            <property name="controlType">list-box</property>
            <property name="mustMatch">true</property>
            <property name="fixedOrder">true</property>
            <property name="distinct">true</property>
            <structure name="format">
                <property name="category">Unformatted</property>
            </structure>
            <list-property name="selectionList">
                <structure>
                    <property name="value">Group</property>
                    <property name="label">Country</property>
                </structure>
                <structure>
                    <property name="value">Group1</property>
                    <property name="label">Product Line</property>
                </structure>
                <structure>
                    <property name="value">Group2</property>
                    <property name="label">Date</property>
                </structure>
            </list-property>
        </scalar-parameter>
        <scalar-parameter name="Measure" id="39">
            <property name="valueType">static</property>
            <property name="dataType">string</property>
            <property name="paramType">simple</property>
            <property name="controlType">list-box</property>
            <property name="mustMatch">true</property>
            <property name="fixedOrder">true</property>
            <property name="distinct">true</property>
            <structure name="format">
                <property name="category">Unformatted</property>
            </structure>
            <list-property name="selectionList">
                <structure>
                    <property name="value">SALES</property>
                    <property name="label">Sales</property>
                </structure>
                <structure>
                    <property name="value">PROFIT</property>
                    <property name="label">Profit</property>
                </structure>
            </list-property>
        </scalar-parameter>
    </parameters>
    <data-sources>
        <oda-data-source extensionID="org.eclipse.birt.report.data.oda.jdbc" name="Data Source" id="7">
            <property name="odaDriverClass">org.eclipse.birt.report.data.oda.sampledb.Driver</property>
            <property name="odaURL">jdbc:classicmodels:sampledb</property>
            <property name="odaUser">ClassicModels</property>
            <property name="OdaConnProfileName"></property>
        </oda-data-source>
    </data-sources>
    <data-sets>
        <oda-data-set extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet" name="Data Set" id="8">
            <list-property name="columnHints">
                <structure>
                    <property name="columnName">COUNTRY</property>
                    <property name="displayName">COUNTRY</property>
                </structure>
                <structure>
                    <property name="columnName">PRODUCTLINE</property>
                    <property name="displayName">PRODUCTLINE</property>
                </structure>
                <structure>
                    <property name="columnName">ORDERDATE</property>
                    <property name="displayName">ORDERDATE</property>
                </structure>
                <structure>
                    <property name="columnName">SALES</property>
                    <property name="displayName">SALES</property>
                </structure>
                <structure>
                    <property name="columnName">PROFIT</property>
                    <property name="displayName">PROFIT</property>
                </structure>
            </list-property>
            <structure name="cachedMetaData">
                <list-property name="resultSet">
                    <structure>
                        <property name="position">1</property>
                        <property name="name">COUNTRY</property>
                        <property name="dataType">string</property>
                    </structure>
                    <structure>
                        <property name="position">2</property>
                        <property name="name">PRODUCTLINE</property>
                        <property name="dataType">string</property>
                    </structure>
                    <structure>
                        <property name="position">3</property>
                        <property name="name">ORDERDATE</property>
                        <property name="dataType">date</property>
                    </structure>
                    <structure>
                        <property name="position">4</property>
                        <property name="name">SALES</property>
                        <property name="dataType">float</property>
                    </structure>
                    <structure>
                        <property name="position">5</property>
                        <property name="name">PROFIT</property>
                        <property name="dataType">float</property>
                    </structure>
                </list-property>
            </structure>
            <property name="dataSource">Data Source</property>
            <list-property name="resultSet">
                <structure>
                    <property name="position">1</property>
                    <property name="name">COUNTRY</property>
                    <property name="nativeName">COUNTRY</property>
                    <property name="dataType">string</property>
                    <property name="nativeDataType">12</property>
                </structure>
                <structure>
                    <property name="position">2</property>
                    <property name="name">PRODUCTLINE</property>
                    <property name="nativeName">PRODUCTLINE</property>
                    <property name="dataType">string</property>
                    <property name="nativeDataType">12</property>
                </structure>
                <structure>
                    <property name="position">3</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">4</property>
                    <property name="name">SALES</property>
                    <property name="nativeName">SALES</property>
                    <property name="dataType">float</property>
                    <property name="nativeDataType">8</property>
                </structure>
                <structure>
                    <property name="position">5</property>
                    <property name="name">PROFIT</property>
                    <property name="nativeName">PROFIT</property>
                    <property name="dataType">float</property>
                    <property name="nativeDataType">8</property>
                </structure>
            </list-property>
            <property name="queryText">select c.country, p.productline, o.orderdate, sum(od.priceeach*od.quantityordered) as Sales, sum((od.priceeach-p.buyprice)*od.quantityordered) as Profit 
from customers c, products p, orders o, orderdetails od
where o.ordernumber = od.ordernumber
and od.productcode = p.productcode
and o.customernumber = c.customernumber
group by c.country, p.productline, o.orderdate</property>
        </oda-data-set>
    </data-sets>
    <cubes>
        <tabular-cube name="Data Cube" id="9">
            <property name="dimensions">
                <tabular-dimension name="Group" id="14">
                    <property name="defaultHierarchy">NewTabularHierarchy</property>
                    <property name="hierarchies">
                        <tabular-hierarchy name="NewTabularHierarchy" id="15">
                            <property name="levels">
                                <tabular-level name="COUNTRY" id="16">
                                    <property name="dataType">string</property>
                                    <property name="columnName">COUNTRY</property>
                                </tabular-level>
                            </property>
                        </tabular-hierarchy>
                    </property>
                </tabular-dimension>
                <tabular-dimension name="Group1" id="17">
                    <property name="defaultHierarchy">NewTabularHierarchy1</property>
                    <property name="hierarchies">
                        <tabular-hierarchy name="NewTabularHierarchy1" id="18">
                            <property name="levels">
                                <tabular-level name="PRODUCTLINE" id="19">
                                    <property name="dataType">string</property>
                                    <property name="columnName">PRODUCTLINE</property>
                                </tabular-level>
                            </property>
                        </tabular-hierarchy>
                    </property>
                </tabular-dimension>
                <tabular-dimension name="Group2" id="20">
                    <property name="isTimeType">true</property>
                    <property name="defaultHierarchy">NewTabularHierarchy2</property>
                    <property name="hierarchies">
                        <tabular-hierarchy name="NewTabularHierarchy2" id="21">
                            <property name="levels">
                                <tabular-level name="year" id="22">
                                    <property name="dataType">integer</property>
                                    <property name="dateTimeLevelType">year</property>
                                    <list-property name="attributes">
                                        <structure>
                                            <property name="name">DateTime</property>
                                            <property name="dataType">date-time</property>
                                        </structure>
                                    </list-property>
                                    <property name="columnName">ORDERDATE</property>
                                </tabular-level>
                                <tabular-level name="quarter" id="23">
                                    <property name="dataType">integer</property>
                                    <property name="dateTimeLevelType">quarter</property>
                                    <list-property name="attributes">
                                        <structure>
                                            <property name="name">DateTime</property>
                                            <property name="dataType">date-time</property>
                                        </structure>
                                    </list-property>
                                    <property name="columnName">ORDERDATE</property>
                                </tabular-level>
                                <tabular-level name="month" id="24">
                                    <property name="dataType">integer</property>
                                    <property name="dateTimeLevelType">month</property>
                                    <list-property name="attributes">
                                        <structure>
                                            <property name="name">DateTime</property>
                                            <property name="dataType">date-time</property>
                                        </structure>
                                    </list-property>
                                    <property name="columnName">ORDERDATE</property>
                                </tabular-level>
                            </property>
                        </tabular-hierarchy>
                    </property>
                </tabular-dimension>
            </property>
            <property name="measureGroups">
                <tabular-measure-group name="Summary Field" id="10">
                    <property name="measures">
                        <tabular-measure name="SALES" id="11">
                            <expression name="measureExpression">dataSetRow["SALES"]</expression>
                            <property name="dataType">float</property>
                        </tabular-measure>
                    </property>
                </tabular-measure-group>
                <tabular-measure-group name="Summary Field1" id="12">
                    <property name="measures">
                        <tabular-measure name="PROFIT" id="13">
                            <expression name="measureExpression">dataSetRow["PROFIT"]</expression>
                            <property name="dataType">float</property>
                        </tabular-measure>
                    </property>
                </tabular-measure-group>
            </property>
            <property name="dataSet">Data Set</property>
        </tabular-cube>
    </cubes>
    <styles>
        <style name="report" id="4">
            <property name="fontFamily">"Verdana"</property>
            <property name="fontSize">10pt</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="crosstab" id="6">
            <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="table-header" id="40">
            <property name="backgroundColor">#6078BF</property>
            <property name="fontFamily">"Arial"</property>
            <property name="fontSize">small</property>
            <property name="fontWeight">bold</property>
            <property name="color">#FFFFFF</property>
            <property name="paddingTop">0px</property>
            <property name="paddingLeft">0px</property>
            <property name="paddingBottom">0px</property>
            <property name="paddingRight">0px</property>
        </style>
        <style name="table-footer" id="41">
            <property name="backgroundColor">#6078BF</property>
            <property name="fontFamily">"Arial"</property>
            <property name="fontSize">small</property>
            <property name="fontWeight">bold</property>
            <property name="color">#FFFFFF</property>
            <property name="paddingTop">0px</property>
            <property name="paddingLeft">0px</property>
            <property name="paddingBottom">0px</property>
            <property name="paddingRight">0px</property>
        </style>
        <style name="table-detail" id="42">
            <property name="backgroundColor">#E6ECFF</property>
            <property name="fontFamily">"Arial"</property>
            <property name="fontSize">x-small</property>
            <property name="fontWeight">bold</property>
            <property name="color">#000080</property>
            <property name="paddingTop">0px</property>
            <property name="paddingLeft">0px</property>
            <property name="paddingBottom">0px</property>
            <property name="paddingRight">0px</property>
        </style>
        <style name="table-group-header-1" id="43">
            <property name="backgroundColor">#809FFF</property>
            <property name="fontFamily">"Arial"</property>
            <property name="fontSize">small</property>
            <property name="fontWeight">bold</property>
            <property name="color">#FFFFFF</property>
            <property name="paddingTop">0px</property>
            <property name="paddingLeft">0px</property>
            <property name="paddingBottom">0px</property>
            <property name="paddingRight">0px</property>
        </style>
        <style name="table-group-footer-1" id="44">
            <property name="backgroundColor">#809FFF</property>
            <property name="fontFamily">"Arial"</property>
            <property name="fontSize">small</property>
            <property name="fontWeight">bold</property>
            <property name="color">#FFFFFF</property>
            <property name="paddingTop">0px</property>
            <property name="paddingLeft">0px</property>
            <property name="paddingBottom">0px</property>
            <property name="paddingRight">0px</property>
        </style>
        <style name="special-header" id="45">
            <property name="backgroundColor">#6078BF</property>
            <property name="fontFamily">"Arial"</property>
            <property name="fontSize">medium</property>
            <property name="fontWeight">bold</property>
            <property name="color">#FFFFFF</property>
            <property name="paddingTop">0px</property>
            <property name="paddingLeft">0px</property>
            <property name="paddingBottom">0px</property>
            <property name="paddingRight">0px</property>
        </style>
        <style name="crosstab-detail" id="46">
            <property name="backgroundColor">#E6ECFF</property>
            <property name="fontFamily">"Arial"</property>
            <property name="fontSize">x-small</property>
            <property name="fontWeight">bold</property>
            <property name="color">#000080</property>
            <property name="paddingTop">0px</property>
            <property name="paddingLeft">0px</property>
            <property name="paddingBottom">0px</property>
            <property name="paddingRight">0px</property>
        </style>
        <style name="crosstab-header" id="47">
            <property name="backgroundColor">#6078BF</property>
            <property name="fontFamily">"Arial"</property>
            <property name="fontSize">small</property>
            <property name="fontWeight">bold</property>
            <property name="color">#FFFFFF</property>
            <property name="paddingTop">0px</property>
            <property name="paddingLeft">0px</property>
            <property name="paddingBottom">0px</property>
            <property name="paddingRight">0px</property>
        </style>
        <style name="mydata" id="48">
            <property name="color">#004080</property>
            <structure name="numberFormat">
                <property name="category">Currency</property>
                <property name="pattern">$ #,##0.00</property>
            </structure>
        </style>
    </styles>
    <page-setup>
        <simple-master-page name="Simple MasterPage" id="2">
            <property name="topMargin">0.25in</property>
            <property name="leftMargin">0.25in</property>
            <property name="bottomMargin">0.25in</property>
            <property name="rightMargin">0.25in</property>
            <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>
</report>



I had this result in the web viewer ( it was worse in the preview):
https://dl.dropboxusercontent.com/u/54730350/web_viewer.PNG

Is this code outdated? Or is there any workaround for this?
Thanks for the help,

David

Re: Crosstable problem after BIRT 4.2 upgrade [message #1067112 is a reply to message #1066756] Fri, 05 July 2013 23:32 Go to previous messageGo to next message
Michael Williams is currently offline Michael Williams
Messages: 1595
Registered: July 2009
Senior Member

If you look at the above example's code, the measure section only adds the header label, not the actual measure. Oddly enough, this works for older versions. It appears that this is a fix for later versions to actually require that the measure element be created.

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.
Re: Crosstable problem after BIRT 4.2 upgrade [message #1067369 is a reply to message #1065823] Mon, 08 July 2013 12:48 Go to previous messageGo to next message
David Vinicz is currently offline David Vinicz
Messages: 13
Registered: July 2012
Junior Member
Hi Michael,

Thanks for the reply. I was afraid I made another mistake somewhere else, but then I understand why the measure is missing (its really strange then if it was enough earlier). Could you provide some code snippet for adding the measure properly? Do you know any similar changes in the newer versions which I should be aware of?
Thanks for the help,

David
Re: Crosstable problem after BIRT 4.2 upgrade [message #1068290 is a reply to message #1065823] Fri, 12 July 2013 22:29 Go to previous messageGo to next message
Michael Williams is currently offline Michael Williams
Messages: 1595
Registered: July 2009
Senior Member

Sorry for the delay. Here's a modified version of the report.

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.
Re: Crosstable problem after BIRT 4.2 upgrade [message #1070124 is a reply to message #1068290] Wed, 17 July 2013 09:24 Go to previous messageGo to next message
David Vinicz is currently offline David Vinicz
Messages: 13
Registered: July 2012
Junior Member
Hi Michael,

Thanks for the solution, you saved me a lot of time!

David
Re: Crosstable problem after BIRT 4.2 upgrade [message #1071250 is a reply to message #1070124] Fri, 19 July 2013 16:38 Go to previous messageGo to next message
Michael Williams is currently offline Michael Williams
Messages: 1595
Registered: July 2009
Senior Member

Not a problem. Let us know whenever you have questions!

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.
Re: Crosstable problem after BIRT 4.2 upgrade [message #1075870 is a reply to message #1065823] Tue, 30 July 2013 08:30 Go to previous messageGo to next message
David Vinicz is currently offline David Vinicz
Messages: 13
Registered: July 2012
Junior Member
Hi Michael!

Unfortunately I'm having the same issue with totals(CrosstabDEAPI.rptdesign)

This code worked fine in earlier vesions but after 4.2 its not adding the aggregations (and also the bindings) properly to the measure automatically. I tried to use the same method to create the binding and the aggregation cells which you mentioned related to the measures, and I could make it work with grand totals (CrosstabDEAPI_workingGrand.rptdesign)

There is a problem with this solution if I want to add subtotals, because in that case I have to calculate somehow the index of the aggregation cells, which sounds like a dirty hack:)
Could you provide some better solution?
Thanks for the help,

David

[Updated on: Tue, 30 July 2013 08:39]

Report message to a moderator

Re: Crosstable problem after BIRT 4.2 upgrade [message #1079039 is a reply to message #1075870] Sun, 04 August 2013 00:43 Go to previous messageGo to next message
Michael Williams is currently offline Michael Williams
Messages: 1595
Registered: July 2009
Senior Member

Sorry for the delay. I had some tasks I had to get done that kept me out of here. Did you figure this out? Or are you still stuck?

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.
Re: Crosstable problem after BIRT 4.2 upgrade [message #1079838 is a reply to message #1079039] Mon, 05 August 2013 06:25 Go to previous messageGo to next message
David Vinicz is currently offline David Vinicz
Messages: 13
Registered: July 2012
Junior Member
Hi Michael,

No problem, I also have other tasks to do, so I put this on hold for now because working grand totals are enough for now. But any idea how to solve the problem wihout the dirty hack I mentioned above is appreciated.

Thanks for your help,

David
Re: Crosstable problem after BIRT 4.2 upgrade [message #1080542 is a reply to message #1079838] Tue, 06 August 2013 04:23 Go to previous messageGo to next message
Michael Williams is currently offline Michael Williams
Messages: 1595
Registered: July 2009
Senior Member

Okay. I had meetings all day today and will for the next two days as well. I'll take a look at it as soon as I can though.

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.
Re: Crosstable problem after BIRT 4.2 upgrade [message #1084669 is a reply to message #1080542] Sun, 11 August 2013 23:44 Go to previous messageGo to next message
Michael Williams is currently offline Michael Williams
Messages: 1595
Registered: July 2009
Senior Member

Sub totals will be added on the levelViewHandle. So, if you were to add a second group to the column or row dimension, you'd add your SubTotal and Aggregation header to the outer group's levelViewHandle. This will create your cells and allow you to add your header label/data item and your aggregation to the body cell. Hope this helps. I can look at modifying your example to include this if you'd like.

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.
Re: Crosstable problem after BIRT 4.2 upgrade [message #1084731 is a reply to message #1065823] Mon, 12 August 2013 02:08 Go to previous messageGo to next message
Michael Williams is currently offline Michael Williams
Messages: 1595
Registered: July 2009
Senior Member

I got a little time this evening and went ahead and added the subtotal in your example.

Hope this helps. It can probably be cleaned up a little, but it works.


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.
Re: Crosstable problem after BIRT 4.2 upgrade [message #1085697 is a reply to message #1084731] Tue, 13 August 2013 08:36 Go to previous messageGo to next message
David Vinicz is currently offline David Vinicz
Messages: 13
Registered: July 2012
Junior Member
Hi Michael,

Sorry for the late reply, your solution looks like much better than mine. Unfortunately I cant try it right now with my exact code, but I think now it will be fine. By the way is there a book or any documentation which describes the API at least on this level? It would be really usefull if I could get examples like this and than you dont have spend your time with amateurs like me (I know BIRT Exchange but thats not a structured book like thing which I would like).
Thanks for the help, you saved me again

David
Re: Crosstable problem after BIRT 4.2 upgrade [message #1085821 is a reply to message #1085697] Tue, 13 August 2013 12:23 Go to previous messageGo to next message
Michael Williams is currently offline Michael Williams
Messages: 1595
Registered: July 2009
Senior Member

I used the source as a doc. You can download the source here:

http://git.eclipse.org/c/birt/org.eclipse.birt.git/refs/

If you scroll down, you'll see all the release downloads.


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.
Re: Crosstable problem after BIRT 4.2 upgrade [message #1087960 is a reply to message #1085821] Fri, 16 August 2013 10:58 Go to previous messageGo to next message
David Vinicz is currently offline David Vinicz
Messages: 13
Registered: July 2012
Junior Member
Hi Michael,

Thanks for the tip, thats not exactly what I expected, but much better than nothing Smile

David
Re: Crosstable problem after BIRT 4.2 upgrade [message #1089091 is a reply to message #1087960] Sun, 18 August 2013 05:37 Go to previous messageGo to next message
Michael Williams is currently offline Michael Williams
Messages: 1595
Registered: July 2009
Senior Member

Yeah, unfortunately I wasn't able to find that in the Java doc. I might write up a blog sometime soon about writing a crosstab with subtotals and totals dynamically. Smile

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.
Re: Crosstable problem after BIRT 4.2 upgrade [message #1089092 is a reply to message #1087960] Sun, 18 August 2013 05:38 Go to previous message
Michael Williams is currently offline Michael Williams
Messages: 1595
Registered: July 2009
Senior Member

Yeah, unfortunately I wasn't able to find that in the Java doc. I might write up a blog sometime soon about writing a crosstab with subtotals and totals dynamically. Smile

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:Performance problem while Exporting Birt Report in JSF
Next Topic:How to run a birt report from jsp page
Goto Forum:
  


Current Time: Thu Sep 18 05:52:47 GMT 2014

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

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