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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

iif()

Status
Not open for further replies.

asm338s

Programmer
Jul 16, 2001
135
US
I am using IIF() in a report by saying:
IIF(exp1, '', resultExp)
Is there anyway I can check for two expressions. For example: IIF(exp1 AND exp2, '', resultExp)
 
IIF()'s can also be nested:

IIF(exp1, IIF(exp2, '', resultExp2), resultExp1)

And so on.

Dave S.
 
You might even want to create a function in your main program or procedure call and reference that in your detail band (i.e. myrepfunction()). I've done that when the nested iffs get really complex.
 
iif(sts='A','Active',iif(sts='M','Martched ','Cancelled'))

Hope this help u.
 
I am connecting to a paradox database and using SQLEXEC statements to retrieve data. I need to join to tables when I retrieve the information. ie(SQLEXEC('Select borrower.loannumber from borrower join loanacc on borrower.loannumber = loanacc.loannumber', 'la'). When I try to use a join I do not get any data. If I use two SQLEXEC statements (IE. select * from borrower - Select * from loanacc) and put the data into two cursor then I can join the cursors. The problem is I have to retrieve every record in borrower and loanacc. I only want the mathcing records. Does anybody know why a join will not work against a paradox database?
 
You can also build text end to end i.e.
lc_text = iif(cond,truepart,falsepart) + iif(cond,truepart,falsepart) etc.
This is useful when you are using iif in a query. Too many nesting levels will, aside from being a nightmare to maintain, generate a 'too complex' error. JHall
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top