Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Developing Analytics Applications
How to merge rows dynamically in grid or table in report
Migrateduser
Hi..
I have a question ! ...
I design report in birt, use 3.7.2
I've searched as much as I can, but I don't know how to solve this ...
only I've found is how to merge cells ...not rows ...
[importPackage( Packages.org.eclipse.birt.report.model.api );
elementFactory = reportContext.getDesignHandle().getElementFactory()
var mytable = reportContext.getDesignHandle().findElement("mytable");
//get header and add label
var myheader = mytable.getHeader( ).get( 0 );
tcell = myheader.getCells( ).get( 1 ).drop();
tcell = myheader.getCells( ).get( 0 );
tcell.setColumnSpan(2);
tcell.setRowSpan(1);]
I thought it also works for detail rows...so I tried ..
but it works for only cols ...
like this
var mydetail = mytable.getDetail().get(0);
tcell = mydetail .getCells( ).get( 1 ).drop();
tcell = mydetail .getCells( ).get( 0 );
tcell.setColumnSpan(2);
tcell.setRowSpan(1);] //this for cols ..
and tried ..
var trow1 = mydetail . getRows(). get(0);
var trow2 = mydetail . getRows(). get(1);
trow2..getCells( ).get( 0 ).drop();
var tcell2 = trow2..getCells( ).get( 0 );
tcell2.setRowSpan(2);...
but dosen't work...:(
I wnat to do this cause ..
there is data has same values ..as group header...
that my thought of design report is ..
I attached image file ..
if there is a way, plz let me know ...
or other way ..like using group table ..? or something .. ...? ..
Find more posts tagged with
Comments
There are no comments yet