removing grouping by codes [message #88804] |
Tue, 08 November 2005 12:59  |
Eclipse User |
|
|
|
Originally posted by: jspsim.yahoo.com
Hi,
I had 20 reports which are required for both online viewing and export to
CSV. The export to CSV was using a method from a previous post by "David
Trainor" (see extract below). In my report I had grouping, and when I tried
to read the row["columnName"] in Table's onRow() method, the grouping will
cause the row to be read differently (when I remove the grouping, the
row["columnName"] will be read correctly). Is there anyway for me to remove
the grouping programmically, so that the report can be export to CSV.
[The following is extract from David Trainor post]
If you need a quick workaround you could open a file in the report's
initialize() method and close it in the report's afterFactory() method.
Then on the Table's onRow() method - write a csv line to the file using
row["column-name1"] + "," + row["column-name2"] + "," +
row["column-name3"]...
you could do this in the main report - but it would always create a csv
file - or you could write another "csv driver" report that does this when
the user clicks on a "Download to CSV" link in the main report - which
runs the csv driver report and then points the browser at the resulting
csv file"
regards,
titan
|
|
|
|
Re: removing grouping by codes [message #89719 is a reply to message #89253] |
Thu, 10 November 2005 10:38  |
Eclipse User |
|
|
|
Titan,
Is the problem that when you add the group you lose the first row in the
table.onRow method?
One way that may help you get around this is to put the code that you
currently have in the onRow method, in the onCreate of the last control you
have in the Detail section of the table.
Jason Weathersby
BIRT PMC
"Titan" <jspsim@yahoo.com> wrote in message
news:dkt2rf$hl9$1@news.eclipse.org...
> can someone pls help.
>
> "Titan" <jspsim@yahoo.com> wrote in message
> news:dkqpih$7q1$1@news.eclipse.org...
>> Hi,
>>
>> I had 20 reports which are required for both online viewing and export to
>> CSV. The export to CSV was using a method from a previous post by "David
>> Trainor" (see extract below). In my report I had grouping, and when I
>> tried to read the row["columnName"] in Table's onRow() method, the
>> grouping will cause the row to be read differently (when I remove the
>> grouping, the row["columnName"] will be read correctly). Is there anyway
>> for me to remove the grouping programmically, so that the report can be
>> export to CSV.
>>
>> [The following is extract from David Trainor post]
>> If you need a quick workaround you could open a file in the report's
>> initialize() method and close it in the report's afterFactory() method.
>>
>> Then on the Table's onRow() method - write a csv line to the file using
>> row["column-name1"] + "," + row["column-name2"] + "," +
>> row["column-name3"]...
>>
>> you could do this in the main report - but it would always create a csv
>> file - or you could write another "csv driver" report that does this when
>> the user clicks on a "Download to CSV" link in the main report - which
>> runs the csv driver report and then points the browser at the resulting
>> csv file"
>>
>> regards,
>> titan
>>
>>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.44883 seconds