473,738 Members | 6,332 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Report showing products in descening order



I need some help to build a report enumerating the products in
descending order depending on the sum of liters.
In this way i can view the top products sold for a given period.But i
fail to do it.
In my query i have build a total as follows

SELECT products.Produc tid, products.grade, products.size, Sum([order
details].liters)

AS SumOfliters, orders.invoiced ate
FROM products INNER JOIN ((affiliates INNER JOIN Customers ON
affiliates.afid =

Customers.afid) INNER JOIN (orders INNER JOIN [order details] ON
orders.orderid =

[order details].OrderID) ON Customers.Custo merid = orders.customer id) ON

products.Produc tid = [order details].ProductID
GROUP BY products.Produc tid, products.grade, products.size,
orders.invoiced ate
ORDER BY Sum([order details].liters) DESC;
In this query i do not have the whole quantity of each product, but i do
not want to make use of two queries. I have succeeeded to build a
query enumerating each

product with the total quantity for this product, but this quantity is
not in descending order, beging with the biggest sum of liters.

In the Sorting and grouping optioins of the report i have :
productid ascending
Adding "sumofliter s" in this option does not change the order or the
products shown.
Can somebody help me build a report showing the sums of liters for each
product
in descending order?


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #1
2 3130
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Do you want the liters sorted within the ProductID grouping? If so in
the report's Sort/Group By dialog box put the ProductID field above
the SumOfLiters field and set the SumOfLiters order Descending. This
will give a result like this:

ProductID Grade Size SumOfLiters
- --------------------------------------
1 a 2" 250
1 z 3" 100
1 x 1" 50
3 t 10" 400
3 c 2" 38
25 a 3" 1000
25 z 11" 60

If you don't care about the sort order of the ProductID then put the
SumOfLiters field above the ProductID field in the Sort/Group By
dialog box. This will give a result like this:

ProductID Grade Size SumOfLiters
- --------------------------------------
3 a 5" 250
5 z 10" 100
1 x 1" 50

- --
MGFoster:::mgf
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBP4rrt4echKq OuFEgEQKPfgCeI0 Y+C/kM+O8owIXxNm0vv oY1mwMAn0jO
k4ctfd7fKGP3grc rMNRt5Xmj
=/GRX
-----END PGP SIGNATURE-----

Hohn Upshew wrote:

I need some help to build a report enumerating the products in
descending order depending on the sum of liters.
In this way i can view the top products sold for a given period.But i
fail to do it.
In my query i have build a total as follows

SELECT products.Produc tid, products.grade, products.size, Sum([order
details].liters)

AS SumOfliters, orders.invoiced ate
FROM products INNER JOIN ((affiliates INNER JOIN Customers ON
affiliates.afid =

Customers.afid) INNER JOIN (orders INNER JOIN [order details] ON
orders.orderid =

[order details].OrderID) ON Customers.Custo merid = orders.customer id) ON

products.Produc tid = [order details].ProductID
GROUP BY products.Produc tid, products.grade, products.size,
orders.invoiced ate
ORDER BY Sum([order details].liters) DESC;
In this query i do not have the whole quantity of each product, but i do
not want to make use of two queries. I have succeeeded to build a
query enumerating each

product with the total quantity for this product, but this quantity is
not in descending order, beging with the biggest sum of liters.

In the Sorting and grouping optioins of the report i have :
productid ascending
Adding "sumofliter s" in this option does not change the order or the
products shown.
Can somebody help me build a report showing the sums of liters for each
product
in descending order?


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Nov 12 '05 #2
I had a little difficulty determining just how you were trying to accomplish
arranging the data in descending order.

Grouping and Ordering in reports is, indeed, controlled by the Sorting and
Grouping properties you have specified. If the "Sumofliter s" field in your
query is the first item in Sorting and Grouping, and you have selected
Descending order, then that's the way your Report should be arranged.

If you have some other field in the Sorting and Grouping list before
Sumofliters, then, of course, Sumoflitiers would not be the highest level
sort, but only a sort within a higher-level sorting or grouping.

Larry Linson
Microsoft Access MVP
"Hohn Upshew" <fa*****@yahoo. com> wrote in message
news:3f******** *************@n ews.frii.net...


I need some help to build a report enumerating the products in
descending order depending on the sum of liters.
In this way i can view the top products sold for a given period.But i
fail to do it.
In my query i have build a total as follows

SELECT products.Produc tid, products.grade, products.size, Sum([order
details].liters)

AS SumOfliters, orders.invoiced ate
FROM products INNER JOIN ((affiliates INNER JOIN Customers ON
affiliates.afid =

Customers.afid) INNER JOIN (orders INNER JOIN [order details] ON
orders.orderid =

[order details].OrderID) ON Customers.Custo merid = orders.customer id) ON

products.Produc tid = [order details].ProductID
GROUP BY products.Produc tid, products.grade, products.size,
orders.invoiced ate
ORDER BY Sum([order details].liters) DESC;
In this query i do not have the whole quantity of each product, but i do
not want to make use of two queries. I have succeeeded to build a
query enumerating each

product with the total quantity for this product, but this quantity is
not in descending order, beging with the biggest sum of liters.

In the Sorting and grouping optioins of the report i have :
productid ascending
Adding "sumofliter s" in this option does not change the order or the
products shown.
Can somebody help me build a report showing the sums of liters for each
product
in descending order?


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
17669
by: Nathan Bloomfield | last post by:
Does anyone know if there is any documentation which relates to Access2k + ? or can anyone help adjust the code? I am having trouble converting the DAO references. TITLE :INF: How to Create a Dynamic Crosstab Report PRODUCT :Microsoft Access PROD/VER:1.00 1.10 OPER/SYS:WINDOWS
13
3922
by: salad | last post by:
Hi Guys: I was stuck. I needed to send a report to a file. My beautiful report(s) in Access were going to require loss of formatting with RTFs, a PITA in WordMailMerge, sending it as a text file...whatever. I described my situation to the guy I'm doing work for and he did some research for me and came up with the following link. http://www.novapdf.com/ The part that should excite us Access developers is their SDK
2
3234
by: jburris | last post by:
In my current database, I have a single table which contains order information such as product, unit price and payment. The payment for each product is entered in and subtotals and totals are calculated fields on reports. With this setup our customers pay for each product in full. I am trying to divide the table to move payment information to a related table such that customers can make partial or installment payments. I managed to...
0
1071
by: karlbaker02 | last post by:
Hi. I am currently creating a database for all of my customers and the products that they order. I have made a form that contains a link to open a report. When this is clicked, the report pulls out information such as telephone number etc from the form and into the report. This all comes from the "Customers Main" table. Now, I have a second table which contains all of the products which the customers order. The problem I am having is that I want...
3
1315
by: igendreau | last post by:
I have a table and each record lists a Company Name, Order Date, and an Extended Sell Price. What I need to create is a report with 4 columns: Company Name, 2004 Sales, 2005 Sales, 2006 Sales. Each year's sales will be the sum of the Extended Sell Price for that company during that year. So the final result will be a list of companies, and to the right of them, each companies sales totals for each year. What's the easiest way to do...
11
1973
by: Ryan | last post by:
I am writing a VB (2005) program that will allow the user to fill out and print a form. The form input is stored in a database (SQL 2005) to be retrieved/viewed/printed later. The form is originally a Word Document, I also have this form as a PDF. Appearance and quality is critical for this form.. so what I thought I'd do is convert the form to a bitmap, use a picture object on my VB form and overlay textbox (no border) controls on top...
1
2795
by: kamalis14 | last post by:
I am trying to create a summary report that will be run monthly for Clients. I just cant seem to work it out. Each client can order 3 types of products. Each type consists of product codes describing the product. So, ClientX can order a 1,2 and/or 3 product that belong to TypeA and product 4,5 which belong to TypeB. Each product order also has an ascending status code ascociated with how far along the product is to being complete/cancelled....
1
3042
by: Sport Girl | last post by:
Hi everybody , i have the task of developing in Perl a script that retrieves data from 3 tables ( bugs, profiles, products) from a MySQL database called bugs and display them in an excel sheet report. I always get when trying to test it " 500 Internal Server Error - The server encountered an internal error or misconfiguration and was unable to complete your request." Can somebody help me please.
2
2399
by: awojciehowski | last post by:
Can any one point me in the right direction here... I have a report that shows an entry and under that record there are several sub records...best way to explain it is imagine an order with several items in that order entry. I have placed a DateAdd feature in a report that will show me 90 days after the date order was made. My problem lies in that the DateAdd feature is now showing multiple times under each order...it lists the same...
0
9473
Oralloy
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...
1
9259
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,...
0
9208
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8208
agi2029
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...
0
6053
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();...
0
4569
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...
0
4824
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3279
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2193
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.