Click to See Complete Forum and Search --> : Display 'None' if field is empty
gems
June 3rd, 2005, 03:34 PM
I am grouping my report on a field called Crew. This field is sometimes empty and so the group header doesn't show anything. I want that if this field is empty the report should display 'none' instead of just leaving it blank. How can I do that?
Thanks
kristyw
June 5th, 2005, 09:11 PM
Use a formula to display the group header. Ie, if Crew is Group #1 :
If IsNull(Group#1Name) then
"None"
else
Group#1Name
Group Header names are available through formula editor the same as all other report/database fields.
gems
June 6th, 2005, 09:26 AM
Thanks for replying kristyw. I am new to Crystal. Where should I put this formula?
kristyw
June 6th, 2005, 06:41 PM
Create a new formula and drag it onto your form.
gems
June 7th, 2005, 08:31 AM
It gives me an error saying "The ) is missing" and highlisghts Group on the first line.
If IsNull(Group#6Name) then
"None"
else
Group#6Name
kristyw
June 7th, 2005, 08:31 PM
Here's my working formula :
If IsNull(GroupName ({VRP_CUST_DETAILS.ACCOUNTNUMBER})) then
"None"
else
GroupName ({VRP_CUST_DETAILS.ACCOUNTNUMBER})
Learn how to use CR Formula Editor - it's very handy when it comes to creating these types of formulas as you can drag the field names into it and easily find all the available functions.
gems
June 8th, 2005, 09:04 AM
Thanks, that works just fine.
codeguru.com
Copyright WebMediaBrands Inc., All Rights Reserved.