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

Problem adding field lengths together. 1

Status
Not open for further replies.

Stoffel24

Technical User
Apr 4, 2002
121
ZA
I have the following in a formula:
Local NumberVar H := Len({#ContractTemp}) + Len({#DDPM}) + Len({#DilatTemp}) + Len({#Hard}) + Len({#Contract});

This returns a value of null/blank. However, if I change the formula to read:
Local NumberVar H := Len({#ContractTemp})
I get an answer of 3. Why does the top one not work? Any ideas?

All I really want is a way to find out whether there is anything returned in the above fields. If nothing is returned, then I want to suppress the details section in which this formula appears.

Thanks
 
Why don't you suppress on 'isnull({field})'?

Naith
 
I needed to ensure that the result of every one of the fields was blank which is why I was using a variable. However, your suggestion was useful in that I put the following formula in the suppress section area:

If IsNull({#Ash}) and IsNull({#Contract}) and IsNull({#ContractTemp}) and IsNull({#DDPM}) and IsNull({#DilatTemp})and IsNull({#Hard}) and IsNull({#Max}) and IsNull({#Moisture}) and IsNull({#Roga}) and IsNull({#Soft}) and IsNull({#SoftTemp})and IsNull({#Sulphur}) and IsNull({#Volatiles}) and IsNull({#Dilat}) then true

This did the trick. Thanks a lot Naith.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top