Hello,
I have an interactive report that I want the report to display all the data when it's directed from navigation tab, but display filtered data when it's directed from other page (which will pass the filter value). So I have two questions:
1. how to build the sql query: as below, I have a conditional where clause, but it doesn't work for the part to display all non-filter data. Don't know how to make this study_id=study_id work.
select "ROWID",
"STUDY_SITE_NAME",
"STUDY_SITE_ID",
"STUDY_SITE_NAME_NUM_ID",
"STUDY_SITE_OPEN_STATUS",
"BASELINE_SITE_GRADE",
"STUDY_SITE_ACTIVE_STATUS"
from "#OWNER#"."TBL_STUDY_SITE"
where study_id=
case
when :P7_SELECTED_STUDY is not null then :P7_SELECTED_STUDY
else :study_id
end
2. how to set page item when it's directed from navigation tab? Say, the very first time to click the navigation tab, :P7_SELECTED_STUDY will be null, but once it's redirected from other page, this page item already have a value, re-click navigation tab can't set it back to null any more...
Thanks in advance!