I'm using Crystal Reports 2008 and Peachtree 2011(Pervasive SQL is the database engine).
I am creating a sales commission report.
The sales rep has a field for storing the commission category. The categories are STR, SAE and SAP.
If the sales rep's commission category is "STR" then there are 5 different commission rates to use:
If the item sold falls into price level 1, then the commission rate is 5%, if the item sold falls into price level 2, then the commission rate is 4%, if the item sold falls into price level 3, then the commission rate is 3%, if the item sold falls into price level 4, then the commission rate is 2%, and if the item sold falls into price level 5, then the commission rate is 1%.
If the sales rep's commission category is "SAE", the commission rates are: PriceLevel1 = 17% commission rate, PriceLevel2 = 15%, PriceLevel3: 12%, PriceLevel4: 10%, PriceLevel 5: 8%, PriceLevel 6: 6% and PriceLevel 7: 4%
If the sales rep's commission category is "SAP", the commission rates are: PriceLevel1 = 20%, PriceLevel2 = 17%, PriceLevel3 = 14%, PriceLevel4 = 12%, PriceLevel5 = 10%, PriceLevel6 = 8% and PriceLevel7 = 6%
I tried the following formula:
If{Employee.Type}= "STR" then (({LineItem.PriceLevel1Amount}*.05) or ({LineItem.PriceLevel2Amount}*.04) or ({LineItem.PriceLevel3Amount}*.03) or ({LineItem.PriceLevel4Amount} * .02) or {LineItem.PriceLevel5Amount} * .01))
I receive and error message that "the remaining text does not appear to be part of the formula"
Can someone help me with the formula so the correct commission rates are applied according to the commission category and Price Level?
I am creating a sales commission report.
The sales rep has a field for storing the commission category. The categories are STR, SAE and SAP.
If the sales rep's commission category is "STR" then there are 5 different commission rates to use:
If the item sold falls into price level 1, then the commission rate is 5%, if the item sold falls into price level 2, then the commission rate is 4%, if the item sold falls into price level 3, then the commission rate is 3%, if the item sold falls into price level 4, then the commission rate is 2%, and if the item sold falls into price level 5, then the commission rate is 1%.
If the sales rep's commission category is "SAE", the commission rates are: PriceLevel1 = 17% commission rate, PriceLevel2 = 15%, PriceLevel3: 12%, PriceLevel4: 10%, PriceLevel 5: 8%, PriceLevel 6: 6% and PriceLevel 7: 4%
If the sales rep's commission category is "SAP", the commission rates are: PriceLevel1 = 20%, PriceLevel2 = 17%, PriceLevel3 = 14%, PriceLevel4 = 12%, PriceLevel5 = 10%, PriceLevel6 = 8% and PriceLevel7 = 6%
I tried the following formula:
If{Employee.Type}= "STR" then (({LineItem.PriceLevel1Amount}*.05) or ({LineItem.PriceLevel2Amount}*.04) or ({LineItem.PriceLevel3Amount}*.03) or ({LineItem.PriceLevel4Amount} * .02) or {LineItem.PriceLevel5Amount} * .01))
I receive and error message that "the remaining text does not appear to be part of the formula"
Can someone help me with the formula so the correct commission rates are applied according to the commission category and Price Level?