Conditional dropdown list in parameter form [message #383677] |
Thu, 29 January 2009 11:40 |
scorpio4frenz
Messages: 48 Registered: October 2008
|
Member |
|
|
I have a report with a parameter form containing a parameter called "person_name". As of now, it is a dropdown list which is built using a select query over my "people" table and displays all the people in the table. I need to add a checkbox on the parameter page which says "Show only current people" and when this checkbox is checked, the "person_name" dropdown list should be limited to only current people. I don't know how to add a checkbox to the parameter form, and how to implement this conditional if-then-else on the dropdown list.
My current query for the dropdown list is:
SELECT 1 co11,' ALL - ALL' col2
FROM dual
UNION
SELECT person_seq_num col1, last_name||','||first_name col2
FROM people
ORDER BY 2 asc
When the checkbox is checked, my query needs to be:
SELECT 1 co11,' ALL - ALL' col2
FROM dual
UNION
SELECT person_seq_num col1, last_name||','||first_name col2
FROM people
WHERE person_current_flag='Y'
ORDER BY 2 asc
Can anyone help with this problem? Thanks in advance.
|
|
|
|
|
|