Hello there!
I do have a classic report-region with a sql-query as source and only one column (formatted “rich-text”) as the content.
The (simplified) report-source query is:
select
upper(a.servicename)||' =
(DESCRIPTION_LIST=
(FAILOVER = ON)
(LOAD_BALANCE = OFF)
(DESCRIPTION =
(SOURCE_ROUTE = yes)
(ADDRESS = (PROTOCOL = TCP)(HOST = aserver)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = '||lower(b.fqdn)||')(PORT = 1521))
(CONNECT_DATA = (SERVICE_NAME = '||upper(a.servicename)||'))
)
)' as tnsnames
from servicestable a, servertable b
where
a.hostid=b.id
order by a.servicename;
It is basically a generated tnsnames.ora-file, which you all will know. Nothing special.
I enabled the “Download”-attribute with ‘|’ (pipe) as “CSV separator”, ‘ ’ (space) as “CSV Enclosed By” and an obvious filename “tnsnames.ora”.
(I followed the suggestions on old-but-gold https://forums.oracle.com/ords/apexds/post/downloading-report-as-txt-file-from-interactive-report-2750 , last comment)
Everything looks good, the resulting file works as intended.
Except the filename-extension.
I have to have the downloaded file as “tnsnames.ora” and not “tnsnames.ora.csv” which apex automatically generates.
Now my question is:
How can I get rid of the “.csv” file-extension?
(I know, there are several ways of generating an own file and preserve an own name to it, but I'd love to stuck with the simple and straightforward way, the classic report/download-csv process preserves)
Hope, you can help me outta that!
Cheers
Jo
(will review this on monday)