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
Designing Analytics Reports
How to add data cells to group header?
Migrateduser
Hi,
I currently have a report where users can choose up to 10 columns to be displayed in a table.
I am using the following code to dynamically insert the columns and data into the detail row of the table.
var mytable = reportContext.getDesignHandle().findElement("MainTable");
for (j=1; j<10;j++) {
if (params["column_"+j]!="blank") {
//second parameter is before(-1) or after(1)
mytable.insertColumn(j,1);
//get first detail row
mydetail = mytable.getDetail().get(0);
//get first column and add detail data item
var tcell = mydetail.getCells( ).get( j );
var mydata = elementFactory.newDataItem( null );
mydata.setResultSetColumn( params["column_"+j].value);
tcell.getContent( ).add( mydata );
//get header and add label
var myheader = mytable.getHeader( ).get( 0 );
tcell = myheader.getCells( ).get( j );
var mylabel = elementFactory.newLabel( null );
mylabel.setText( params["column_"+j].displayText );//$NON-NLS-1$
tcell.getContent( ).add( mylabel );
}
This is working fine but I have now been asked to re-create the report so that the data is not but in the detail but into the 'lowest' of 4 possible groups that might have been setup.
So my question is how would i need to alter this code to insert the data cells into the groupheader row and not into the detail row of the table.
Thanks in advance.
Find more posts tagged with
Comments
There are no comments yet