Go Back   Forum - BIRT Exchange > Designing BIRT Reports Forums > Eclipse BIRT Newsgroup Mirror

 
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-01-2009, 08: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?


  #2 (permalink)  
Old 07-02-2009, 08:50 AM
Jason Weathersby
 
Posts: n/a
Default Re: Export Data - Available Columns

Try:

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

Jason

SuperTime wrote:
> 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?
>
>
 


Thread Tools
Display Modes




All times are GMT -7. The time now is 09:57 PM.
Powered by vBulletin Copyright © 2000-2010 Jelsoft Enterprises Limited.


Content Relevant URLs by vBSEO 3.1.0