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

Formula Number Issue

Status
Not open for further replies.

Extrmdressage

Technical User
Sep 24, 2009
12
US
I have a formula that I am trying to create. It looks like this: if {HoursPerPay} = '80.00' then '1.00'. The HoursPerPay field is a number field. When I try to check it in Crystal 8.5, I get an error indicating 'a number is required here' and the cursor blinks in front of the '80.00'. Any ideas?
 
By wrapping numbers in '' you are converting to text

try

if {HoursPerPay} = 80 then '1.00'

If you do not want the result to be a numeric string again remove ''

If you are trying to get 2 decimal places just format the formula once you place on the report designer. However, generally Crystal defaults to 2 decimal places for all numeric fields.

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top