Report to run with null value or entered value

There are many available reports in Oracle Apps so you can discuss the requirements related to these reports here.
Post Reply
naveedapps
Posts: 3
Joined: Tue Nov 13, 2007 7:54 am
Location: India

Report to run with null value or entered value

Post by naveedapps »

Deal All,

My requirement is to display the records based on the parameter value.if we enter parameter value then it should pick only that record if you don't pass any value (NULL) then display all the records.

Please help me out in this issue. Please send me the sample report to naveedapps@gmail.com

Many thanks in advance.



Allah hafeeez,
Naveed
Pirzada
Posts: 30
Joined: Fri Dec 07, 2007 2:04 am
Location: Pakistan

Post by Pirzada »

Dear Naveed,
use the nvl clause in your report, like

table.column = nvl(parameter, table.column)

Regards,
Ali Pirzada
abdul.rahman2k
Posts: 3
Joined: Sun Aug 09, 2009 8:58 am
Location: India

Post by abdul.rahman2k »

Dear Naveed,

This requirement of yours can be done in more than one ways.

1. select * from table where column_name = Nvl(:parameter, column_name)

2. select * from table where (:parameter is null ) <b>OR</b> (column_name = :parameter)

Both of them works. if you have any more share it too.

Best of luck.

Abdul Rahman
admin
Posts: 2062
Joined: Fri Mar 31, 2006 12:59 am
Location: Pakistan
Contact:

Post by admin »

Lexical reference is also good to play with parameters. tks
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests