Reports Parameters [message #180914] |
Wed, 05 July 2006 16:15 |
muleybubs
Messages: 2 Registered: July 2006
|
Junior Member |
|
|
My shop is running 9i. I have FINALLY been assigned my first Report (training (on 10g) was in 12-05). I need to select either all rows or rows with a specific date column populated. Want to give user a parm along the lines of "Select All Rows?" (LOV 'Y' or 'N'), as 'Y' will be the option 98% of the time. Is this accomplished with a AfterPForm? Or with a lexical reference parm? Obviously, there is only 1 difference in my where clause. I have a feeling that I have been dancing around this all day, and am just worn out now. Coming from a db2 world, I am excited, but confused. Thanks for any help.
|
|
|
Re: Reports Parameters [message #181324 is a reply to message #180914] |
Sat, 08 July 2006 13:48 |
dude4084
Messages: 222 Registered: March 2005 Location: Mux
|
Senior Member |
|
|
what i perceived from ur post is that there will be two path
1) Select all records regardless of date.
2) Select records matching with the date selected in the LOV.
is it so? also tell that whether LOV will have fix values of date?
if not then ur explaination is needed.
|
|
|
Re: Reports Parameters [message #181576 is a reply to message #180914] |
Mon, 10 July 2006 11:26 |
muleybubs
Messages: 2 Registered: July 2006
|
Junior Member |
|
|
Thank you for your reply. The report is just looking for the presence/abscence of a date. I ended up using a UNION SQL statement with a bind parm in the where clause. Put the choices on my LOV. This approach also enabled me to give them a third choice. Thanks again for your help.
SELECT
COL1, COL2, COL3, COL4
FROM
TABLE1, TABLE2
WHERE
TABLE1.COL1 = TABLE2.COL2
AND :P_WHICH = 'ALL RECS'
UNION
SELECT
COL1, COL2, COL3, COL4
FROM
TABLE1, TABLE2
WHERE
TABLE1.COL1 = TABLE2.COL2
AND :P_WHICH = 'RECS WITH NO CAP DATE'
UNION
SELECT
COL1, COL2, COL3, COL4
FROM
TABLE1, TABLE2
WHERE
TABLE1.COL1 = TABLE2.COL2
AND :P_WHICH = 'RECS WITH CAP DATE'
ORDER BY COL1 ASC
|
|
|