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!

How to deal with empty fields in a CR report

Status
Not open for further replies.

Gunga

IS-IT--Management
Oct 8, 2002
8
BR
I have to concatenate fields to form a name of infdividuals or organizations. In the case of Individuals there a 3 fields: {givenname},{middlename} and {familyname}. In the case of no Individuals the fields are {name1} and {name2} but when {middlename} or {name2} have no value the result is null for all. What should I do? See the code:


(if {ado.Individual}=true then
(if {ado.MiddleName} = "" then {ado.GivenName} &" "& {ado.FamilyName} else {ado.GivenName} &" "& {ado.MiddleName} &" "& {ado.FamilyName} )
else
(if {ado.Name2}= "" then
{ado.Name1} else {ado.Name1}&" "& {ado.Name2}))

& " - " & {ado.PartnerID}
 
Select File->Report Options->Convert null values to default.

Now you can concatenate without the null problems.

If you require nulls in other areas of the report, you'll have to use the isnull() test against the fields as part of your logic.

-k kai@informeddatadecisions.com
 
Thank you for your prompt response!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top