View Single Post
  #1 (permalink)  
Old 07-01-2009, 07:32 AM
SuperTime
 
Posts: n/a
Default Export Data - Available Columns

I understand that the columns shown in the export list are all the columns
listed under the binding tab.
I do not want the aggregation bindings to show up in the export.

So I use the following code as a work around:

Modifed the BirtSimpleExportDataDialog.js file in the ajax directory of
the viewer.in the __bind method I modified and added an if statement.

for ( var k = 0; k < resultSets.length; k++ )
{
var resultSet = resultSets[k];

var queryNames = resultSet.getElementsByTagName( 'QueryName' );
oSelects[0].options.add( new Option( queryNames[0].firstChild.data ) );

this.availableResultSets[k] = {};

var columns = resultSet.getElementsByTagName( 'Column' );
for( var i = 0; i < columns.length; i++ )
{
var column = columns[i];

var columnName = column.getElementsByTagName( 'Name' );
var label = column.getElementsByTagName( 'Label' );
if (columnName != 'ORDERDATE')
{
this.availableResultSets[k][label[0].firstChild.data] =
columnName[0].firstChild.data;
}
}
}


After saving the above code. I run the report in birt viewer and use the
export data options. The column ORDERDATE still exists and shows up in the
export document.

Am I doing something incorrect?