Oracle Apex - Create / Pass / Set Interactive Report (IR) Filters as parameters through URL
Credits : 1 2
STEP 1 - Define static id for interactive report region
STEP 2 - Change URL syntax to contain - Report ID | Filter | COLUMN NAME :
( Example 1 : will add interactive report filter with IN operator )
http://mywebsite.com/ords/f?p=103:2:::::IR[MOS]IN_SR_COMPANY:\Coca Coba,Gudai Exchange Holdings\
Where :
- IR - Prefix is mandatory
- [MOS] - Static Id of Interactive Report.
- IN - interactive report filter IN operator ( see operator list below)
- SR_COMPANY - interactive report column name.
- \Coca Coba,Gudai Exchange Holdings\ - value of filter ( in this example : 2 companies names ).
Result:
( Example 2 : will add interactive report filter with contains operator and will clear previous filters )
http://mywebsite.com/ords/f?p=103:2::::CIR:IR[MOS]C_SR_COMPANY:\GMC Sport Company\
Where :
- CIR - cleans previous filters
- IR - Prefix is mandatory
- [MOS] - Static Id of Interactive Report.
- C - interactive report filter contains operator ( see operator list below)
- SR_COMPANY - interactive report column name.
- GMC Sport Company - value of filter ( in this example : 2 companies names ).
Result:
LIST OF VALID OPERATORS (oracle apex official documentation) :
Valid operators include:
C = Contains
EQ = Equals (this is the default)
GTE = Greater than or equal to
GT = Greater Than
LIKE = SQL Like operator
LT = Less than
LTE = Less than or equal to
N = Null
NC = Not Contains
NEQ = Not Equals
NLIKE = Not Like
NN = Not Null
NIN = Not In (escape the comma separated values with a leading and trailing backslash, )
IN = In (escape the comma separated values with a leading and trailing backslash, )
ROWFILTER = Row Text Contains (this searches all columns displayed in the report with type STRING or NUMBER)