Interactive report pdf getting downloaded with 0 bytes & damaged or corrupt
Hi Experts,
I need your help and expertize in resolving (any pointers) an issue that I'm facing in downloading interactive reports in PDF format using "APEX_UTIL.download_print_document" API @button click.
Issue: The interactive report pdf getting downloaded using "APEX_UTIL.download_print_document" API is of 0 bytes.
Steps:
1. In shared components, created report query and report layout as follows:
2. If using the “Test Report” option in the report query screen, this report is working as expected and printing the results.
3. Created a button “TEST_REPORT” in the page to download above report at runtime using PLSQL API.
4. Created a PLSQL page process to invoke the “APEX_UTIL.download_print_document” API at a button “TEST_REPORT” click.
APEX_UTIL.DOWNLOAD_PRINT_DOCUMENT( p_file_name => 'OSSIUpgradeCoExx'
,p_content_disposition => 'attachment'
,p_application_id => :APP_ID
,p_report_query_name => 'COSmallReportQuery'
,p_report_layout => 'COSmallReportLayout'
,p_report_layout_type => 'rtf'
,p_document_format => 'pdf'
);
5. Running the page and clicking on the same “Test Report” button to download the report.
6. I get the open/save file dialog box and the file size displayed is 0 bytes. When try to open, it displays a message "... not a supported file type or because the file has been damaged..".
Thanks in advance
Regards,
Parmod