0
votes

Dears ,

I Have a selected list that contain values dynamiclly from the database ,
I am trying to build a Region Classic Report (Base on Function ) Using the selected value.
The source code of this region based on PL/SQL Function Body returning SQL Query as below :

DECLARE
   V_SELECT    VARCHAR2 (4000);
   V_SELECT2   VARCHAR2 (4000);
   V_DESC      VARCHAR2 (1000);
BEGIN
   IF :P1224144_PRE_SEL IS NULL
   THEN
      V_SELECT :=
            'SELECT '
         || LTRIM (GML.GML_GET_COLUMNS ('RI'), ',')
         || ' FROM GML.GML_SCENARIOS ';
      RETURN V_SELECT;
   ELSE
      V_SELECT2 :=
            'SELECT '
         || LTRIM (GML.GML_GET_COLUMNS (:P1224144_PRE_SEL), ',')
         || ' FROM GML.GML_SCENARIOS ';
      RETURN V_SELECT2;
   END IF;
END; 

My problem is that i cant get the selected value from the list always return null and the code will execute the first select (V_SELECT ) only .
I put the Page Action on Selection of the List as Redirect and Set Value .
Correct Result when select null value Or 'RI'

No data found is the result when select Not null value

Please Advice
Best Regards
Yousef Farraj

2
Have you tried selecting RIpsaraj12
Yes its giving the same result as null but anything else return no data foundY F
Inspect the data in gml_scenariospsaraj12
Everything is ok , i tried to change the 'RI' on the null condition to 'P' and 'LI' and its getting the data correct ,so the problem is i cannot get the selected list value its always execute the null select (V_SELECT )Y F
Just print and debug the value of :P1224144_PRE_SEL to find the issuepsaraj12

2 Answers

0
votes

On the Dynamic Actions section, under action Execute PL/SQL Code, select all the items to submit in Items to Submit attribute.

0
votes

Apex reports regions (Classic and IR) have a property named Page Items to Submit in the source section, where you must include all page elements that you can change and its values are required when your query is executed. enter image description here