Filtered results

Thingame

New member
Local time
Today, 05:45
Joined
Nov 18, 2013
Messages
8
Good morning,

I'm hoping someone can solve my problem...or at least point me in the right direction...

When I say problem...it may be a couple.

Firstly, I have a report which displays a customer's contibution to Costs of an Account, but only the Areas that particular customer contributes towards. A form will filter the Account and a button then pulls up the report for that account and for a specific customer (based on customer number which is found in a drop down).

When the report is run the front page has a sub report which shows the total contribution per area; whilst later pages then break out each area into separate costs.
For example - Office Costs (Area) could include electricity, water, cleaning etc; Whilst External Costs (Area) could include electricity, water, gardening etc; Gym Costs (Area) would include equipment leasing, repairs etc.
If the customer only pays towards the external and the gym...that's all they see. The current report then shows the finances - prior costs, expected costs, current budget and new budget.

I have created a copy of the report that will only show the new budget, but then shows, for each cost in each area, how much the customer contributes; it will also show how much that contribution works out per week. This is all fine.

One problem I'm having is when I try to throw in a formula that details how much of the Area Total each cost equates to. The total for the area is calculated as =Sum[Column4] and this works fine for each Area...and then for the whole Account (the sum of the area totals). However, when I try a simple =[column4]/sum([column4]) as a percentage, it uses the Account total as the sum rather than the area total. It seems to work for everything else...so I can't figure out why it won't work for this.

The other thing I need to try to create is probably another sub report for the first page. I want to be able to pull out some of the key costs for each area, and display thew information detailed in the paragraph above. What I've not decided is whether to show, say, the 5 most expensive costs; or to allow the user to define which costs they want to show. Writing a query to get the core information is easy enough, but how to I get a filter / parameter to display either the top 5 or user defined?

Sorry that it's a little long-winded. I'm not able to upload the db so I'm trying to explain as much as possible. If I need to be more specific, or copy/paste areas of coding, I will do what I can.

Many thanks

Stuart
 
Pretty long post.
When the report is run the front page has a sub report which shows the total contribution per area; whilst later pages then break out each area into separate costs.
For example - Office Costs (Area) could include electricity, water, cleaning etc; Whilst External Costs (Area) could include electricity, water, gardening etc; Gym Costs (Area) would include equipment leasing, repairs etc.
If the customer only pays towards the external and the gym...that's all they see. The current report then shows the finances - prior costs, expected costs, current budget and new budget.

One problem I'm having is when I try to throw in a formula that details how much of the Area Total each cost equates to. The total for the area is calculated as =Sum[Column4] and this works fine for each Area...and then for the whole Account (the sum of the area totals). However, when I try a simple =[column4]/sum([column4]) as a percentage, it uses the Account total as the sum rather than the area total. It seems to work for everything else...so I can't figure out why it won't work for this.
I don't fully understand your question but in which section did you place the code?

At least show us a legible screenshot of the report in design view.
 
Hi vbaInet,

I know and I apologise. I've inherited a db and this is the first time I've really used Access...so I'm learning as I go.

The data is pulled together in a query and the report selects the relevant information on either a customer by customer basis (user can select an individual customer on a form) or every customer for a given account.

Hopefully, the attached images and the explanations below will help.

Page 1

The mini report consolidates the financial information for each area the customer contributes to, pulls the customer’s proportion of the cost, calculates the customer’s portion of the cost, then further breaks it down by week.


Subsequent pages

Ignoring the text columns on the left, the numbers are:
Column 4 – imported budget numbers, with a sum along the total line.
Customer contribution per cost – customer portion of each individual cost
Contribution per week – the line above / 52
The currently titled variance column should be set to take any of the preceding columns (I chose the first as it seemed easier) and was supposed to calculate what proportion of the total this cost is. For example – if electricity is showing as £1,000 and the total cost for the Area is £10,000, it should return 10%. What it is actually doing is taking the entire account total (say, £100,000) and returning 1%.

Many thanks
 

Attachments

Users who are viewing this thread

Back
Top Bottom