This discussion is archived
3 Replies Latest reply: Aug 2, 2013 2:32 AM by fac586 RSS

Set IR report filters

skapex Newbie
Currently Being Moderated

Apex 4.1

 

1.I need to set IR report column filter based on an application item.

I have application item G_CURRENT_YEAR which stores current year.

Now depending on item value i need to compare quarter like if 2013 then like operator should be applied on quarter column like '2013%'.

On year change to 2014 filter should check for 2014 quarters.

 

2.My report represents different projects,on basis of some sql query condition i need to show only those projects which satisfy the sql condition.

I mean the sql query should be dynamic to filter out specific project ids. Can we set row/column filters.

 

My classic report query looks something like this

 

DECLARE

v_sql CLOB;

BEGIN

v_sql := 'select * from projects';

 

IF :REQUEST='FILTER' THEN

v_sql := v_sql||'AND EXISTS (select 1 from project_lookup where project_lookup.project_id=projects.project_id)';

END IF; --this if condition i need to apply it as filter

 

END;

 

I have my IR report on projects table

Here my main concern is how to filter data comparing project_lookup table which is cannot be used in my IR report query.How to represent above classic report query in IR report

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points