Conditional Calculations on reports

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

Hi

can anyone help on this? I have a report where I have the number of days
worked shown. This could be anywhere between 0 and 10. A bonus is
entered, for example £500. This is divided between 5 days. If the days
worked = 1 therefore, the bonus is £100, if 2 days worked = £200. However
there is a cap on this so that once 5 days are worked the bonus is £500 and
does not go above this. Now as a piece of code this is easy to do using an
if.. else routine but I'm not sure how I can put it onto a report!

I have each employee as a line in query with the number of days worked. How
can i produce this conditional calculation on to a report?

Thanks
 
Hi

can anyone help on this? I have a report where I have the number of days
worked shown. This could be anywhere between 0 and 10. A bonus is
entered, for example £500. This is divided between 5 days. If the days
worked = 1 therefore, the bonus is £100, if 2 days worked = £200. However
there is a cap on this so that once 5 days are worked the bonus is £500 and
does not go above this. Now as a piece of code this is easy to do using an
if.. else routine but I'm not sure how I can put it onto a report!

I have each employee as a line in query with the number of days worked. How
can i produce this conditional calculation on to a report?

Thanks

You can nest IIF() statments.

As control source in an unbound control on the report:
=IIf([DaysWorked]=0,0,IIf([DaysWorked]>0 and
[DaysWorked]<=4,[DaysWorked] * 100,500))
 
Back
Top