34.9 CLONE_REPORT Function
This function clones a user-saved report and returns a new report ID.
You can clone into a Private or Public report, but you cannot clone into a default report.
Syntax
APEX_IR.CLONE_REPORT (
p_report_id IN NUMBER,
p_new_name IN VARCHAR2,
p_new_description IN VARCHAR2 DEFAULT NULL,
p_new_owner IN VARCHAR2 DEFAULT apex_application.g_user,
p_new_is_public IN BOOLEAN DEFAULT FALSE,
p_replace_report IN BOOLEAN DEFAULT TRUE )
RETURN NUMBER;
Parameters
Parameter | Description |
---|---|
p_report_id |
The source report ID to clone. |
p_new_name |
The new report name. |
p_new_description |
The new report description. |
p_new_owner |
The case-sensitive new owner of the report. If not passed, current user is the owner. |
p_new_is_public |
If new report is Public. If not passed, clones as Private report. |
p_replace_report |
If TRUE (default), report will be replaced if exists. If FALSE , an error raises if a report with the same name and owner already exists.
|
Example
The following example clones a report ID selected from a page item value. The report name and owner are overwritten by the parameter values, and the report is cloned as public report.
DECLARE
l_new_report_id number;
BEGIN
l_new_report_id := apex_ir.clone_report (
p_report_id => :P1_REPORT_ID,
p_new_name => 'New Cloned Report',
p_new_owner => :APP_USER,
p_new_is_public => true );
END;
Parent topic: APEX_IR