|
Re: Export Data - Available Columns [message #368883 is a reply to message #368864] |
Thu, 02 July 2009 14:42 |
Eclipse User |
|
|
|
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 #676050 is a reply to message #675952] |
Thu, 02 June 2011 14:49 |
|
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?
|
|
|
Powered by
FUDForum. Page generated in 0.01554 seconds