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

Peachtree crystal formula for commission

Status
Not open for further replies.

crystalpro

Technical User
Jan 22, 2002
95
US
Commission is based on who the sales rep is and what product is sold. The item type field stores the value of "1" for one type of product and "2" for the other type of product.

The commission rate is stored in a text field for the sales rep.

I want to change the text field to a numeric field so I can multiply it by the sales amount depending on the condition if the product sold is a type 1 or 2.

Here's what I tried:
if NumericText ({Employee.CustomField1}) then ToNumber ({Employee.CustomField1});
if NumericText ({Employee.CustomField2}) then ToNumber ({Employee.CustomField2});
if {LineItem.ItemType} = "1" then {JrnlRow.Amount} * ToNumber({Employee.CustomField1}) else if {LineItem.ItemType} = "2" then {JrnlRow.Amount} * ToNumber({Employee.CustomField2})

Nothing appears in my Commission column on the report.
Any help is greatly appreciated.

 
If you email me the report I will take a look at it.

Software Training and Support for Macola, Crystal Reports and Goldmine
251-621-8972
dgilsdorf@mchsi.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top