-
September 2nd, 2014, 01:53 AM
#1
TEXTS in Crystal Report Formula
Hi Guys,
I'm having a problem to display texts in the crystal report 8.5. I am using the following formula so that the texts should appear in the column.
IF {NPEA00 - Employee Ac.ActionName} = " ROPPR - 1" then "Basic Salary" AND
ELSE
IF {NPEA00 - Employee Ac.ActionName} = " ROPPR - 2" then "Basic Salary/W.days(ex PH)" AND
ELSE
IF {NPEA00 - Employee Ac.ActionName} = " ROPPR - 3" then "Calendar Days" AND
ELSE
If {NPEA00 - Employee Ac.ActionName} = " ROPPR - 4" then "B Salary/260 Days" AND
ELSE
IF {NPEA00 - Employee Ac.ActionName} = " ROPPR - 4" then "B Salary/261 Days" AND
ELSE
0
NPEA00 is the table name and the actionname is the pay item. I would like to get the texts like Basic Salary to pick up in the report. When I'm checking whether the formula has got errors it says that it doesn't. But no values(texts) are showing in the column. I hope I've made myself clear.
Please help.
Regards,
Sohel
-
September 3rd, 2014, 10:58 AM
#2
Re: TEXTS in Crystal Report Formula
You have 2 problems with this formula.
1. Remove all the "AND" from you nested IF statement. Should be if-then-else-if , not if-then-AND-else-if
2. Your final else returns a number while all the if conditions return text. The formula must result in a consistent datatype, so put quotes around the zero like "0"
-
September 4th, 2014, 06:52 AM
#3
Re: TEXTS in Crystal Report Formula
Originally Posted by Ned Pepper
You have 2 problems with this formula.
1. Remove all the "AND" from you nested IF statement. Should be if-then-else-if , not if-then-AND-else-if
2. Your final else returns a number while all the if conditions return text. The formula must result in a consistent datatype, so put quotes around the zero like "0"
Thanks for your help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|