Crystal Reports 2008 blank space in output

I have two table employees and salary history. All employees are in the employees table that includes Salary, hourly and contractors. The only employees that have a record in the salary history table are salary and hourly.

My problem is this, I am trying to write a report that shows if the employee is hourly, salary or contractor. The following formula code works fine for all employees except the contractors. I get a blank space in the crystal report formula for the contractors. I have a default for contractors and I still get a blank space. Can somebody tell me how to overcome this problem.  I am SQL server 2008.
Select {XHR_SalaryHist.SalaryUnit}  
Case "BIWKLY": "SALARY"
Case "SALARY": "SALARY"
Case "ANNUAL": "SALARY"
Case "HR": "Hourly"
Default: "CONTRACTOR" ;


 (second version I tried)
stringvar salary := 'Contract';
if {XHR_SalaryHist.SalaryUnit} in ['BIWKLY', 'ANNUAL']
     THEN salary :='SALARY'
ELSE
    if  {XHR_SalaryHist.SalaryUnit} = 'HR'
        THEN salary :='Hourly'
ELSE
     salary :='CONTRACTOR';
jvonhendyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mlmccCommented:
WHat value is there for contractors?

I suspect it is NULL.  Try this

stringvar salary := 'Contract';
If IsNull({XHR_SalaryHist.SalaryUnit}) THEN
     salary :='CONTRACTOR'
ELSE if {XHR_SalaryHist.SalaryUnit} in ['BIWKLY', 'ANNUAL'] THEN
     salary :='SALARY'
ELSE if  {XHR_SalaryHist.SalaryUnit} = 'HR' THEN
     salary :='Hourly'
ELSE
     salary :='CONTRACTOR';

WHen Crystal tests a NULL value for anything except IsNull it gets an error and stops evaluating.

mlmcc
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jvonhendyAuthor Commented:
there is no value for the contractors because the contractors are NOT in the salary history table.
0
mlmccCommented:
Did you try the formula?

mlmcc
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.