Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Spliting Crystal Reports Formula Range

Spliting Crystal Reports Formula Range

Spliting Crystal Reports Formula Range

I’m using Crystal Reports 7 Access database to write a report against an Access database that will calculate earned sales commission.  The bonus factor is determined by the instant total of an individual’s cumulative yearly sales.  Since each marketing manager has different sales requirements and different assigned bonus factors, the formula is repeated a number of times for the different ranges and factors.  I'm also using RunningTotals formulas extensively in this report.  A sample of the formula, named BonusFactorAdjusted, I’m using to assign the bonus factor is listed below where @Evaluatesales is the cumulative sales total for Jones:

IF GroupName ({BID_SUBJ.MARKETING_MANAGER})= "JONES" and {@Evaluatesales} >= $1 and {@Evaluatesales} <= $4999 then 0.001
IF GroupName ({BID_SUBJ.MARKETING_MANAGER})= "JONES" and {@Evaluatesales} >= $5000 and {@Evaluatesales} <= $9999 then 0.002

To determine the bonus earned for an individual sale, multiply the bonus factor from above by the dollar amount of the individual sale.  As the cumulative sales amount crosses a dollar threshold, a different bonus factor will be used.  The following formula is an example of determining the bonus


This approach is working except in the instances where a sale crosses the threshold from one bonus range to the next.  As it works now, the entire amount for that sales is multiplied by the higher bonus factor.  

What I would like to be able to do is split these amounts that cross a threshold so that both bonus factors could be applied to their respective dollar amounts.  Here is an example of how it is working now using Jones' factors from above:

Sale    cum total    factor        bonus

$3000    $3000        .001      $3  (3000 X .001)

$1000    $4000        .001      $1  (1000 X .001)

$2000    $6000        .002      $4  (2000 X .002)

Here is an example of how I would like to be able to split the amounts:

Sale    cum total    factor        bonus

$3000    $3000        .001      3  (3000 X .001)

$1000    $4000        .001      1  (1000 X .001)

$2000    $6000           $ 999 @. 001  =     $.999
               $1001 @ .002  =    $2.002



RE: Spliting Crystal Reports Formula Range

Do you mean something like this:

if Cuml <=4999
then sale *.01
else 4999 - (Cuml - Sale) * .001 +
     Cuml - 4999 * .002

Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)

RE: Spliting Crystal Reports Formula Range

Thanks Ken!! I just made a slight modification to your suggestion and it works fine for my situation.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close