0
votes

Scenario

  1. Tried to add Oracle Apex Interactive Report Filters using URL.
  2. Followed official doc syntax : Oracle installation doc - 8.4.3 Linking to Interactive Reports yet, could not find straightforward URL syntax for creating IN or CONTAINS operators filters ( in Oracle Apex interactive report ) through URL .
1

1 Answers

0
votes

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

enter image description here





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 ). enter image description here

Result:

enter image description here

( 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:

enter image description here





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)