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

Reporting Populated & Null Values

Status
Not open for further replies.

Meg09

Technical User
Jan 30, 2009
14
0
0
US
Hi,

I am trying to include phone numbers on an associate listing. However, not all associates have a phone number listed in the database. Therefore when I add in the phone number field, only those who have a phone number are displayed on the report. Therefore, I tried creating an ISNULL statement to provide the phone numbers for those who have one and Unknown for those who do not, however my formula seems to have an error. The error states that the first part of my formula is not recognized. Any ideas would be appreciated!

Thanks, Meg

Iif( {'emp_phones.phone_no'} Is NULL, Unknown, {'emp_phones.area_code + emp_phones.phone_no'} where emp_phones.phone_code = 'Work')
 
Possibly use this formula.

//{@workphone}
if(isNull({emp_phones.phone_no}) or TRIM(totext({emp_phones.phone_no})) = ""
THEN "Unknown"
ELSE
(IF {emp_phones.phone_code} = "Work"
THEN {emp_phones.area_code} & {emp_phones.phone_no}
)

Alternatively, if you need only work phones in the report, you could use the selection expert to choose only phone_code equal to work, and remove this (IF {emp_phones.phone_code} = "Work" THEN from above.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top