'Using substitution string for dynamic filename for download in interactive grid
I want to set the filename for download of an interactve grid (Application Express 5.1.0.00.45) dynamically to a combination of a timestamp and the page alias.
What I've already done:
- step: As mentioned in http://oraclequirks.blogspot.com/2008/02/build-and-use-apex-page-alias.html I've built a application item to get a substitution string for the page alias. => Works fine!
- step: As mentioned in APEX dynamically define default filename? I've generated a page item (P510_FILENAME) which shows the filename I would like to use. => Works fine!
- step: To use the content of this page item P510_FILENAME as filename I've set
Report Attributes > Report Export > Filenameto&P510_FILENAME.. => But when I try to download the interactive grid, it shows&p510_filename..csv_as filename!
So I have to problems:
- The substitution string doesn't get replaced by the content of the page item P510_FILENAME. Also if I directly use my application item
&APP_PAGE_ALIAS.it doesn't get replaced. But the (at the moment not hidden) page item P510_FILENAME shows the correct filename. - The file extension is set to '.csv_' instead of '.csv'. All the same when I try to download a HTML file.
Any ideas?
Solution 1:[1]
For &. type substitution string should be all caps.
In this name &p510_filename..csv_ it looks like it was entered in lower case. Please try with the exact(case sensitive) name.
Solution 2:[2]
Late answer for anyone seeing it in the future:
when using substitution string for downloading a file of a table, you need to submit that item in the table region:
and then you can this item in the attributes.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Anuswadh |
| Solution 2 | Izik |


