Exporting data into csv from report region [message #441808] |
Wed, 03 February 2010 03:51 |
|
delna.sexy
Messages: 941 Registered: December 2008 Location: Surat, The Diamond City
|
Senior Member |
|
|
Hi all,
I have some problem in exporting data from report region, because I have to do it with some different kind of situation.
Actually, I have developed a report which contains tree view.
And using java script, I expand and colapse rows up to 3 levels.
Now I have developed one custom export link, which exports all the rows in CSV file (whether or not rows are hidden in tree view).
But now, I have to export only those rows which are visible on the screen, that means, the rows which are not yet expanded should not be exported.
And, I have stuck up here.
Do anyone know the solution? any help?
regards,
Delna
|
|
|
Re: Exporting data into csv from report region [message #446774 is a reply to message #441808] |
Wed, 10 March 2010 06:48 |
dr.s.raghunathan
Messages: 540 Registered: February 2008
|
Senior Member |
|
|
hi,
do you mean to say whatever displayed ie 1-15 rows only need to be converted in csv or whatever filtered on entire table need to be converted? i do not know the solution, but witnessed solution by meself on others job. Let me also refresh / get / understand the solution offered to you by others.
raghu
|
|
|
Re: Exporting data into csv from report region [message #446884 is a reply to message #446774] |
Wed, 10 March 2010 22:05 |
|
delna.sexy
Messages: 941 Registered: December 2008 Location: Surat, The Diamond City
|
Senior Member |
|
|
Hi dr.s.raghunathan,
Thanks for interest.
But I already solved it by following logic.
As I said in OP, let's say query is populating 20 rows.
And using java script, I displayed it in tree view format.
And there are four parent rows with collapse (+) button and each containing 4 child records within it.
Now my requirement was like, If user has expanded first record, then total number of records on the screen will be 8 (1 expanded row + 4 child row + 3 unexpanded row).
And after that, if user clicks on 'export' link, only 8 rows should be exported.
And I came up with following solution.
I added one hidden column having flag value.
If the parent row is collapsed, flag will contain 0. And if row is expanded then flag for that row will contain 1.
Then I read whole report data using APEX_APPLICATION package.
Exported only specific data only using flag value.
regards,
Delna
[Updated on: Wed, 10 March 2010 22:07] Report message to a moderator
|
|
|
|