This content has been marked as final. Show 7 replies
For instance, you have an application item: APP_ITEM_NAME
Your sql query in region A:
select * from tablex;
Change it to:
select * from tablex where column1 = :APP_ITEM_NAME
But in this case, the application item should never be NULL as I believe "= NULL" conditions are never TRUE.
Yes, I have added the condition to my SQL statement using the nvl function which will account for the null conditions. However, the page does not refresh properly when the filter is selected. I use a dynamic action to 'refresh' and filter the SQL statement because I currently am using a drop down list to allow the user to select a particular project. I have specified that the project_number (a page item called P17_PROJECT_NUMBER) be submitted in the report region definition source but the result is still not filtered. Any ideas? I know I am missing something but just cannot seem to 'see' it at the moment. Could it still be that the P17_PROJECT_NUMBER is still not being saved to session state?
I think page items are immediately available for testing when they are assigned a value.
Have you hard-coded a constant into the SQL -- as a test -- to to make sure than returns what you expect?
Yes! That did it! I had an error in my where clause. DUH! So if I wanted to change my Where Clause to refer to an Application Level Item rather than a page-level item, all I would need to do is reference the application item via 'Where project_name = nvl(V('F101_PROJECT_NUMBER),project_name)'. Correct? In this instance the Project_name and F101_Project_Number refer to the same 'number' variable. Both are varchar2.
Edited by: V Rickert on Feb 27, 2013 1:53 PM
Edited by: V Rickert on Feb 27, 2013 1:54 PM
Reference should/would be exactly as you reference page items. I use the :variable_name format myself.
If you're satisfied, please mark as answered.
Very best wishes,
Thank you! Your help is MUCH appreciated!