Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data selection to include null items 1

Status
Not open for further replies.

koolskins

IS-IT--Management
Nov 22, 2003
79
US
CR10 running on an informix database...

I have the following parameter on my select...

(
if {?disc_code}="ALL" then true
else
if {?disc_code}<>"ALL" then
{ap_discrep_629.discrep_cde}={?disc_code}
)

The primary table is an invoice table with this parameter being directed against a subserviant table containing the individual discrepancy codes against the invoice (many to one).

While this select works, what I really need is for the report to either return all invoices, whether there is a discrep_cde or not (ALL), or only those invoices where the discrep_cde = {?disc_code}.

What is the proper syntax to bascially ask for ALL to equal either isnull({discrep_cde} or any {discrep_cde}?
 
Hopefully you meant that you want it to return BOTH:

(
if {?disc_code} <> "ALL" then
(
isnull({ap_discrep_629.discrep_cde})
or
{ap_discrep_629.discrep_cde}={?disc_code}
)
else
if {?disc_code}= "ALL" then
true
)

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top