Idea Summary
Currently using the APEX APIs one can only export one region using
apex_region.export_data
But its not sufficient when we have two or more regions within a page for example a master detail region.
It would be great if apex can provide a way to club the clob content from the apex_export.t_export variables to one to enable clubbing data from multiple regions to one and printout using the
apex_data_export.download( l_final_export );
Use Case
As with any major application most of the pages follow a master - Detail pattern.
The printing/downloading of such regions into a single PDF or XLS file is not currently supported out of the box from APEX.
Also the problem is not solvable using the APIs from APEX. Because apex_data_export and apex_region doesn't have a support to combine the clobs from mutiple t_export variables
This will force us to use the AOP or Jasper or any other reporting servers. Having a report server and maintaining is a tedious task and not all of our clients are ready to do that.
Preferred Solution (Optional)
The ideal solution will be to have a declarative Print option available at page level instead of individuual region level that will ask users to choose regions to download from and export the data into a single PDF file or the format choosen.
Or Alternatively it would also be sufficient if the current apis can support combining the clob content from two apex_export.t_export type variables
l_final_export, l_export1, l_export2 apex_data_export.t_export%TYPE;
l_export1 := apex_region.export_data (
p_format => :P3_FORMAT,
p_page_id => :APP_PAGE_ID,
p_region_id => l_region_id);
l_export2 := apex_region.export_data (
p_format => :P3_FORMAT,
p_page_id => :APP_PAGE_ID,
p_region_id => l_region_id);
l_final_export.content_clob = l_export1.content_clob + l_export2.content_clob
apex_data_export.download( l_final_export );