Home > APEX_UTIL > DOWNLOAD_PRINT
Previous |
Next |
This procedure initiates the download of a print document using pre-defined report query and pre-defined report layout.
Syntax
APEX_UTIL.DOWNLOAD_PRINT_DOCUMENT ( p_file_name IN VARCHAR, p_content_disposition IN VARCHAR, p_application_id IN NUMBER, p_report_query_name IN VARCHAR2, p_report_layout_name IN VARCHAR2, p_report_layout_type IN VARCHAR2 default 'xsl-fo', p_document_format IN VARCHAR2 default 'pdf', p_print_server IN VARCHAR2 default null);
Parameters
Table: DOWNLOAD_PRINT_DOCUMENT Parameters describes the parameters available in the DOWNLOAD_PRINT_DOCUMENT
procedure for Signature 3.
DOWNLOAD_PRINT_DOCUMENT Parameters
Parameter | Description |
---|---|
|
Defines the filename of the print document |
|
Specifies whether to download the print document or display inline ("attachment", "inline") |
|
Defines the application ID of the report query |
|
Name of the report query (stored under application's Shared Components) |
|
Name of the report layout (stored under application's Shared Components) |
|
Defines the report layout type, that is "xsl-fo" or "rtf" |
|
Defines the document format, that is "pdf", "rtf", "xls", "htm", or "xml" |
|
URL of the print server. If not specified, the print server will be derived from preferences. |
Example for Signature 3
The following example shows how to use the DOWNLOAD_PRINT_DOCUMENT
using Signature 3 (Pre-defined report query and pre-defined report layout). In this example, the data for the report is taken from a Report Query called 'ReportQuery
' stored in the current application's Shared Components > Report Queries. The report layout is taken from a Report Layout called 'ReportLayout
' stored in the current application's Shared Components > Report Layouts. Note that if you wish to provision dynamic layouts, instead of specifying 'ReportLayout
' for the p_report_layout_name
parameter, you could reference a page item that allowed the user to select one of multiple saved Report Layouts. This example also provides a way for the user to specify how they wish to receive the document (as an attachment or inline), through passing the value of P1_CONTENT_DISP
to the p_content_disposition
parameter. P1_CONTENT_DISP
is a page item of type 'Select
List
' with the following List of Values Definition:
STATIC2:In Browser;inline,Save / Open in separate Window;attachment BEGIN APEX_UTIL.DOWNLOAD_PRINT_DOCUMENT ( p_file_name => 'myreport123', p_content_disposition => :P1_CONTENT_DISP, p_application_id => :APP_ID, p_report_query_name => 'ReportQuery', p_report_layout_name => 'ReportLayout', p_report_layout_type => 'rtf', p_document_format => 'pdf'); END;