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

Cannot Create Commission Summary Field - CR8

Status
Not open for further replies.

noslo

Programmer
Dec 10, 2001
24
US
Hello All,

I am trying to get a sum total for a formula field named @commission. The field contains serveral conditions due to various scenarios and works very well for indivual records but does not allow me to get a sum total for commission. When I try to create a summary field, my @commission formula field is not in the list of available fields. When I try to create another formula field to get the sum I get the dreaded error message" Cannot create.....". Here is the lengthy formula:


IF ({tbl_Accounting_Activity.Transaction_Type}=2 and
{@First Record}=false) and previous
({tbl_Accounting_Activity.Transaction_Type})=2
then ({tbl_Product_Description.Price}* -.10)

else IF ({tbl_Accounting_Activity.Transaction_Type}=2 )
and {@First Record}=False and {@Account}= "Residual"
and previous
({tbl_Accounting_Activity.Transaction_Type})in [1,4]
then -$35.00

else if {tbl_Customers_Product.Status_Code}="T" and
{tbl_Accounting_Activity.Transaction_Type} = 2 and
previous({tbl_Accounting_Activity.Transaction_Type})in
[1,4] then -35.00

else if ({tbl_Accounting_Activity.Transaction_Type}
in [1,4] and {@First Record}=True and {@Account}
= "New" and {@Commission Eligible}="Yes")
then $35.00

else if ({tbl_Accounting_Activity.Transaction_Type}
in [1,4] and {@Unauthorized Charge}=True)
then -35.00

else if ({tbl_Accounting_Activity.Transaction_Type}
in [1,4] and {@Account}= "New" and
{@Commission Eligible}="No")then $0.00

else if {tbl_Accounting_Activity.Transaction_Type}in
[1,4] and {@Account}= "Residual" and
{@Commission Eligible}="Yes")
then {tbl_Product_Description.Price}* .10)

What I can I do to resolve? Any suggestions for improvement? Thanks for the help & support. This board is a great resource.

Helen

 
Helen,

The only time I ever got a message like this is when I tried to summarize by a field that did not exist yet, like another summary. Make sure none that the formula fields you refer to in this formula are evaluated for every record in the database and that none of them are summaries of any type.

To test if thisis the case, replace the formula fields in your code with 9999 and see if you still get an error. If so then go examine your formula fields' code. Software Support for Sage Mas90, Macola, Crystal Reports, Goldmine and MS Office
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top