Page 1 of 1

Report to run with null value or entered value

Posted: Mon Jul 27, 2009 3:33 pm
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

Posted: Sat Aug 08, 2009 2:12 pm
by Pirzada
Dear Naveed,
use the nvl clause in your report, like

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

Regards,
Ali Pirzada

Posted: Sun Aug 09, 2009 9:07 am
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

Posted: Sun Aug 09, 2009 9:15 am
by admin
Lexical reference is also good to play with parameters. tks