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

Need quick help with formatting for simple formula 4

Status
Not open for further replies.

jayker

Technical User
Feb 2, 2007
1
0
0
US
I am having trouble with the following formula:
{ORDETAIL.QUANTITY ORDERED} * {INVENDSC.COST}
these are both currency fields but when I check my formula I get the following error message referring to {INVENDSC.COST}:
"A number is required here".
I'm sure it is something simple that I am missing. Please help!
 
I had this problem before. You need to change the field type. Click to show the Type conversion options under functions. (Try CCur first. If that doesn't work, then try CDbl.) If you're in Crystal Syntax your formula will look like this
{ORDETAIL.QUANTITY ORDERED} * CCur({INVENDSC.COST})





 
Yeah, I hate Crystal's currency handling functions, something like VAL() should work but does not, there must be a better way, but try:

val(mid(totext({{INVENDSC.COST}),2))

-k
 
Why would quantity ordered be a currency? Try:

{ORDETAIL.QUANTITY ORDERED} * tonumber({INVENDSC.COST})

-LB
 
Nice, *LB.

I had tried the VAL() function, which doesn't work, tonumber does...

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top