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!

coding based on value of first record 2

Status
Not open for further replies.

noslo

Programmer
Dec 10, 2001
24
US
Please help!

I am writing a commission report. The commission structure is a flat fee of 35.00 on the customer's first transaction and then 10% of purchase price for subsequent transactions. If there are several transactions within a month, how do I code the report to list the first transaction as new and all subsequent records as residual?

Note: There can be several transactions on the same date for one customer.

As you can probably tell by my question, I am new here. Be gentle.

Thanks,

Helen
 
Gentle questions: :eek:)

1. is it possible the first transaction occured before the month you are reporting on? If so, then your report must include data from previous months as well.

2. is there a way to tell which transaction was first within any given date (i.e. time field?).

In general, you can Group the report by Agent, by Customer within Agent, and sort the report by date and time of customer transactions.

Within each customer you can create a formula that returns different values based on it being in the 1st record of that group. Then, just sum that formula.

Cheers,
- Ido ixm7@psu.edu
 
hi,

I would do this:

declare a global variable as boolean. and change it to true or false after the first transaction. All subsequent transaction can be validated using this variable.

Hope this helps. Murali Bala
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top