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

Null Formula

Status
Not open for further replies.

dunkyn

Technical User
Apr 30, 2001
194
US
Newbie question...what is the correct way to serve for a null (blank) ? I receive errors on the first line ...looking for the word then...

If Isnull {POSITION_DG.TRM_TO_MAT_RTE} then "0 - 1 Year"
Else If
If {POSITION_DG.TRM_TO_MAT_RTE}>15 Then "15+ Years"
Else If
{POSITION_DG.TRM_TO_MAT_RTE}>10 Then "10 - 15 Years"
Else If
{POSITION_DG.TRM_TO_MAT_RTE}>5 Then "5 - 10 Years"
Else If
{POSITION_DG.TRM_TO_MAT_RTE}>3 Then "3 - 5 Years"
Else If
{POSITION_DG.TRM_TO_MAT_RTE}>1 Then "1 - 3 Years"
Else If
{POSITION_DG.TRM_TO_MAT_RTE}>0 Then "0 - 1 Year"
else
" "

TIA
 
You also need parens with your IsNull() statement.

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
dgilsdorf@trianglepartners.com
 
As Dgillz said, the format for nulls is
isnull ({what.ever})
You can also say not isnull. But you're right to put it first, a formula field will vanish like a boojum if it finds a null that has not been tested for.

As takure said, your 2nd and 3rd lines are
Else If
If {POSITION_DG.TRM_TO_MAT_RTE}>15 Then "15+ Years"
i.e. you have if if, not a possible command in Crystal



Madawc Williams
East Anglia
Great Britain
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top