Skip to main content



      Home
Home » Archived » BIRT » Export Data - Available Columns
Export Data - Available Columns [message #368864] Wed, 01 July 2009 10:32 Go to next message
Eclipse UserFriend
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?
Re: Export Data - Available Columns [message #368883 is a reply to message #368864] Thu, 02 July 2009 10:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jasonweathersby.windstream.net

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?
>
>
Re: Export Data - Available Columns [message #675952 is a reply to message #368883] Thu, 02 June 2011 02:26 Go to previous messageGo to next message
Eclipse UserFriend
Hi Jason,
Even i have a requirement, where i don't want to show a column item in the export data dialogue box.
I tried the above steps, but that does not help.
Then, i try by removing the "BirtSimpleExportDataDialog.js" file itself, and building my application using tomcat server. But still, export data dialogue box shows up all the column item.
So, my question is does this file handle which column item to show up or not !! Or, there is some other files which handle this?
Re: Export Data - Available Columns [message #676050 is a reply to message #675952] Thu, 02 June 2011 10:49 Go to previous message
Eclipse UserFriend
That is the right file. look at the __bind function. For example I
could modify it to leave out columns name CUSTOMERTOTAL like:

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

var columnName = column.getElementsByTagName( 'Name' );

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

Jason

On 6/2/2011 2:26 AM, pratim wrote:
> Hi Jason,
> Even i have a requirement, where i don't want to show a column item in
> the export data dialogue box.
> I tried the above steps, but that does not help.
> Then, i try by removing the "BirtSimpleExportDataDialog.js" file itself,
> and building my application using tomcat server. But still, export data
> dialogue box shows up all the column item.
> So, my question is does this file handle which column item to show up or
> not !! Or, there is some other files which handle this?
Previous Topic:Layout Problem with Scripted data set with hashmap
Next Topic:Overlay dynamic image
Goto Forum:
  


Current Time: Tue Jul 22 18:43:41 EDT 2025

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

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

Back to the top