Dividing Two Running Sums on a Report

O

Odeh Naber

Greetings all!

I have a report in which I have seven columns:

Column 1: Day number (i.e. Day 1, Day 2, Day 3, etc.).
Column 2: SalesCost for that day.
Column 3: SalesCost to-date (running sum of SalesCost)
Column 4: SalesRevenue for that day.
Column 5: SalesRevenue to-date (running sum of SalesRevenue)
Column 6: CostRatio for that day.
Column 7: CostRatio to-date (value from Column 3 divided by value from
Column 5)

The problem is with Column 7 - I cannot seem to be able to divide the
two numbers and give the result as a percentage. Here is some sample
data to help illustrate what I am trying to achieve - it is the last
column I cannot get to work - RatioTo-Date:

DAY N. CostToday CostTo-Date RevenueToday RevenueTo-
Date RatioToday RatioTo-Date
1 10 10
100 100 10%
10%
2 20 30
50 150 40%
20%
3 15 45
20 170 75%
26,47%

Thank you!
 
K

Ken Sheridan

Leave the ControlSource property of the Column 7 control blank and in the
detail section's Print event procedure assign a value to the control, e.g.

Me.txtCostRatioTodate = _
Format(Me.txtSalesCostTodate/Me.txtSalesRevenueTodate, "Percent")

Ken Sheridan
Stafford, England
 
M

Marshall Barton

Odeh said:
I have a report in which I have seven columns:

Column 1: Day number (i.e. Day 1, Day 2, Day 3, etc.).
Column 2: SalesCost for that day.
Column 3: SalesCost to-date (running sum of SalesCost)
Column 4: SalesRevenue for that day.
Column 5: SalesRevenue to-date (running sum of SalesRevenue)
Column 6: CostRatio for that day.
Column 7: CostRatio to-date (value from Column 3 divided by value from
Column 5)

The problem is with Column 7 - I cannot seem to be able to divide the
two numbers and give the result as a percentage. Here is some sample
data to help illustrate what I am trying to achieve - it is the last
column I cannot get to work - RatioTo-Date:

DAY N. CostToday CostTo-Date RevenueToday RevenueTo-
Date RatioToday RatioTo-Date
1 10 10
100 100 10%
10%
2 20 30
50 150 40%
20%
3 15 45
20 170 75%
26,47%


Try setting the Ratio to Date text box's Format property to
Percent or 0.0%
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top