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

This fieldname is not known

Status
Not open for further replies.

dswitzer

Technical User
Aug 2, 2002
298
US
I am integrating a crystal report into a .net app.

There is a field in my dataset. It does exist. I can show it on the report (although the value is null).

However, when I write a formula to test if it is null, I get errors. I have tried isnull,len()=0,="" -- and they all fail -- yet they all work in straight crystal:

Code:
This field name is not known.
Error in File C:\.........
Error in formula <optionToUnitCodes>.
'iif len({SPCLPRICING.optionTo})=0,"", iif(len(SPCLPRICING.ADDONCODE})=0, "Option to Unit Codes:",""))'

Any ideas?
Thanks.
 
Have you tried testing for NULL in the formula itself?
like

if isnull ({database.fieldname})or {database.fieldname}) = "" then "NULL\EmptyString"
else {database.fieldname})

If the field is not a text field you will have to change the "NULL\EmptyString" to whatever format the field is but this is a good test for null values or empty strings for that matter.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top