Hi,
I am trying to create a report that will show the totals of a query. I have a table as follows
Table :Sales
Fields:
CustName, Product, $Value, VolumeOrdered, DeliveredQuanti ty, Period
I've made a query that retrieves records with in a certain period (aug-08,Sept-08,etc), grouping by CustName and displaying the list of individual products purchased. So the report shows the same information, list of products purchased, grouped by CustName.
I now need to create a section on the report to show the totals of $Value, VolumeOrdered, DeliveredQuanti ty, and some how still show the list of individual products as a list, grouped by CustName.
My ideal report would look something like
Sales Report for Period :
Customer Name :
Product1 $Value VolumeOrdered DeliveredQuanti ty
Product2 $Value VolumeOrdered DeliveredQuanti ty
Product3 $Value VolumeOrdered DeliveredQuanti ty
Totals $Value VolumeOrdered DeliveredQuanti ty
Any help would be appreciated. I've used Access to build databases before, I'm just very rusty since its been years, please treat me like a novice.
Thanks Very Much
EMil
7 4005 NeoPa 32,569
Recognized Expert Moderator MVP
Have a look at Sorting & Grouping within an Access report.
Using a section header &/or footer, you can handle this quite easily. It's designed to work that way naturally.
Let us know how you get on with this.
The problem isnt the grouping, its adding up the result per group. a Totals section. Now I knw how to build a query that will sum all the results per company, but I need to print a report with the list of products too.
EMil
NeoPa 32,569
Recognized Expert Moderator MVP
EMil,
I know you're confused, but please try the advice first before you dismiss it.
If you do you'll find that Sorting & Grouping in an Access report can, indeed, help with your problem.
If, after looking into that you are still confused, please come back requesting further clarification.
Hi NeoPa,
I figured it out, but the grouping and sorting stuff didnt help at all. I already had my data grouped in the right way. My solution is as follows, I personally think its cheating, but I guess it works.
I created two queries, Query1 to retrieve the list of products sold in a period, and then Query2 that totals the results; both are based on the Sales table.
Query1
Fields : CustName, Product, $Value, VolumeOrdered, DeliveredQuanti ty, Period
Query2
Fields CustName, SumoOf$Value, SumOfVolumeOrde red, SumOfDeliveredQ uantity, Period
I then created Query3, linked the CustName and Period from query1 and query2. I selected all the fields for display.
I then create a report using the wizard. I shuffled the data around until the report looked something like:
-----Report Header----------
Sales report for (Query3.Period)
-----Page Header------------
-----CustName Header----
CustName
SumoOf$Value, SumOfVolumeOrde red, SumOfDeliveredQ uantity
(Heading:) Product, Volume ordered, Rand Value, Delivered Quantity
-----Detail Header-----------
Product, $Value, VolumeOrdered, DeliveredQuanti ty
-----Page Footer------------
-----Report Footer----------
I'm not sure if this is the correct way to do it, it seems to be working. However, I will have to see what happens, especially because I need to create other similiar reports.
Any thoughts on this would be appreciated.
Thanks
EMil
NeoPa 32,569
Recognized Expert Moderator MVP
Your solution, though intelligent, is more complex than is needed.
I'm sorry to bring you back to the Sorting and Grouping issue, but if I lead you through it somewhat, hopefully it will become clearer.
Firstly, the underlying table or query need only be in the standard format. It just needs to list all the items.
Within the report, you need to select Sorting and Grouping and add a group for your Product Code. The important thing then is to select (in the group properties underneath) Group Footer = Yes. This provides an extra section on the report where you can add TextBox controls (and various others of course) where you can set the Control Source to "=Sum([VolumeOrdered])" for instance.
You can also add a group for your customer if you will, setting the Group Header to Yes, and include a TextBox in that header to display the customer name and details.
Showing a Report Header and/or Footer, is controlled from the View menu.
As you have already found, it is possible to do very clever things with SQL, but reports were DESIGNED to help with this sort of thing.
I hope this is all clearer now, and if there's anything still troubling you please don't hesitate to ask.
I understand now...Thanks for the patience. I didnt know such a function existed.
It looks good so far, just some adjustments to the layout and it would be just right.
Thanks again.
NeoPa 32,569
Recognized Expert Moderator MVP
No worries. I'm just glad that's helped :)
Welcome to Bytes!
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Nick |
last post by:
Is there a (better) way to get the toal number of results from a query
but still limit them with a LIMIT clause. For example, in a Google
search result, it displays 1-100 of 10,000,000 results. Do they hit
the database once for results, and again for a total count or is it
all in one query? Thanks -Nick
|
by: Rajani |
last post by:
Hello,
I have a table(msaccess) with the structure...
job_code text 6
style text 10
qty number
fabrication text 65
ship_date date/time
|
by: Bill Dika |
last post by:
Hi
I am trying to calculate a running total of a calculated textbox
(tbAtStandard) in GroupFooter1 for placement in a textbox
(tbTotalAtStandard) on my report in Groupfooter0.
The problem that I am having is that sometimes the correct total shows
up in print preview and sometimes it doesn't. Sometimes it is higher
and sometimes it is lower (than the correct amount) and I cannot make
any sense of the difference. The difference...
|
by: Mike |
last post by:
Hello All,
I have a report based upon a query. I have added a control to report
footer that calcs the total cost of the inventory: =SUM().
When this total calculation is NOT on the report, the report displays
as it should in ascending order by inventory number (inv_num).
1102
1103
|
by: geronimo_me |
last post by:
I have 20 queries that compare fields in one table with fields in
another table - the query results are the records that do not match in
Table1 and Table2. ie
Table1
DOB 28/02/78
Table2
DOB 27/02/78
| |
by: SueB |
last post by:
Greetings. I have a report based on the following query (hang in there
... it's quite long):
SELECT Year(.) AS Yr, tblEvents.eventID,
tblEvents.eventname, tblEvents.eventhost, tblEvents.eventcity,
tblEvents.eventstate, tblEvents.eventstartdt, tblEvents.eventenddt,
tblTrials.trialnbr, tblTrials.trialdt, tblTrialClass.trialclassID,
tblClasses.class, tblScores.score, tblScores.level, .
& (" "+.+".") & " " & . & ("
"+.+".") & " (" & . & ",...
|
by: Sunil Korah |
last post by:
Hi,
I haven't used access reports much. I have a problem in getting the
total of a group.
I have 3 fields, ProgName (Program name), Pname (Participant's name)
and PCategory (Participant category)
PCategory can have values 'SC', 'ST' and 'Others'
|
by: klarae99 |
last post by:
I am working on an Inventory Database in Access 2003. I am working on a report that I could print when its time to file our State Sales Tax paperwork. The figures I need for this report are Total Sales(not including tax), the Amount of Sales Subject to Tax, and the Total Sales Including Tax, all gathered for a specific time period.
I have a query (qrySalesTax) to find all sales within a specified date range that also calculates the Total...
|
by: klarae99 |
last post by:
Hello, I am working in Access 2003 on an inventory database. Right now I am working on a report which will be used to fill in forms that our state requires periodically to collect taxes.
Right now I have a query that determines the items that have sold between two dates and calculates the Gross Sales, Tax Collected and Sales Including Tax. This query is set up with the following SQL:
SELECT tblCat.Categories, tblCat.TaxRate,...
|
by: Alagas |
last post by:
Hi, I'm new to access 2003 & would like to know how to create a report that shows the grand total of counts, details are as the following:
1) I've a database of credit cards where I would like to generate a monthly report for all sales-men & total count of approved cards for each (ex. in AUG).
2) A simple query is created to retreive the required data such as: serial no, sales code & card status(approved only)
2) Then Crosstab query is...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |