title: How to pass URL variable into APEX report?
body: <p>I have created an APEX application which needs to take a parameter form the URL, for example P1_ID -> 'ORCL'.</p>
  
  <pre><code>DB1:8080/apex/f?p=101:1::::P1_ID:ORCL:
  </code></pre>
  
  <p>On the page i have a "Classic Report (based on Function)" which should use this parameter.</p>
  
  <pre><code>declare
    l_sql_stmt varchar2(64);
    l_id varchar2(8) := :P1_ID;
  begin
    l_sql_stmt = '
      select
        *
      from
        T1@' || l_id;
    return l_sql_stmt;
  end;
  </code></pre>
  
  <p>When i try to save, it gives me the error:</p>
  
  <pre><code>ORA-01008: not all variables bound
  </code></pre>
  
  <p>How can i use this URL parameter in the PL/SQL function?</p>