Hi,
Apex 21.1
So I have a faceted search (so using classic report) that I am giving a download option to, which the code below works fine for. The issue is that the region does not have a primary key column displayed but I need it in the export file that I create. I can get the PK into the report but no way to hide it in the report and still have the export give me the hidden PK, is there a way to add a column to the region_id on demand? Or even add a row that would be the title of the download, since I have the PK in the download filename?
-- PRODUCE EXPORT FILE
declare
l_export apex_data_export.t_export;
l_region_id number;
begin
select region_id into l_region_id
from apex_application_page_regions
where application_id = :APP_ID
and page_id = :APP_PAGE_ID
and static_id = 'P97_EXPORT_DATA_ID';
l\_export := apex\_region.export\_data (
p\_format => :P97\_DOWNLOAD\_FORMAT,
p\_page\_id => :APP\_PAGE\_ID,
p\_region\_id => l\_region\_id);
apex\_data\_export.download( l\_export );
end;
Thanks