473,657 Members | 2,806 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Access Report Help - Grouping Data by Week Ending Date

5 New Member
Hi,

I have created a report that totals the number of days it took a product to ship by percentage by a date range for a specific location. My data comes from a query with the following headers:

[week ending date] [Packages Entered] [Entry Date] [Location] [Days In Transit]

I used a count iff to calculate the following headers in the report. This is a percent of the total number of packages.

[# of days <=4] [# of days <=5] [# of days <=6]

The report runs fine and gives me the info a need on a week to week basis but I need it to break out the data based on w/e. I am not sure how to go about this.

[W/E Date] [Packages] [Location] [# of days<=4] [# of days<=5] [# of days<=6]

23-Dec 500 New York 25% 50% 100%
16-Dec 475 New York 35% 75% 100%
Any help would be appreciated.
Jan 16 '07 #1
7 9042
nico5038
3,080 Recognized Expert Specialist
Why not add these fields to your query:
select IIF(WE <= 4,1,0) as Count4, IIF(WE <= 5,1,0) as Count5, etc.

Now you can divide the Count4 and Count5 fields in the report with the value from <=6 (I assume that's the case for all) and you have your percentages.

Nic;o)
Jan 17 '07 #2
derekdeben
5 New Member
I have the % calculating. What I cannot figure out is how to have the report break the data out by w/e date. Currently if I select a date range of 12/2 - 12/30 my report does not break it out by week ending it sums everything together. How would I go about listing it by w/e ending date.

Thanks,

Derek
Jan 17 '07 #3
nico5038
3,080 Recognized Expert Specialist
You need to make the query a GroupBy query, or use the [= looking groeping button that will allow the creation of a groupheader and footer.

When you have a GroupBy query, make sure that the W/E is part of the GroupBy, when you have a normal query press the "E" looking button and use GroupBy from the combo for W/E and SUM for the others.

When still problems, please post you SQL so we can have a look.

Nic;o)
Jan 17 '07 #4
derekdeben
5 New Member
Hi,

I have the query as a group by but it is still not working. Here is the sql.

SELECT WeekEnding.[W/E], (DatePart("ww",[W/E])) AS WorkWeek, [112606_123006_R aw].ZIP_5_DIG, [112606_123006_R aw].ENTRY_UNIT, [112606_123006_R aw].STOPCLOCK_FLG, [112606_123006_R aw].DELIVERED_FLG, [112606_123006_R aw].PU_DATE, [112606_123006_R aw].ENTRY_DATE, [112606_123006_R aw].DAYS_C
FROM 112606_123006_R aw LEFT JOIN WeekEnding ON [112606_123006_R aw].ENTRY_DATE = WeekEnding.Date
GROUP BY WeekEnding.[W/E], (DatePart("ww",[W/E])), [112606_123006_R aw].ZIP_5_DIG, [112606_123006_R aw].ENTRY_UNIT, [112606_123006_R aw].STOPCLOCK_FLG, [112606_123006_R aw].DELIVERED_FLG, [112606_123006_R aw].PU_DATE, [112606_123006_R aw].ENTRY_DATE, [112606_123006_R aw].DAYS_C
HAVING ((([112606_123006_R aw].ENTRY_UNIT)=[Enter SCF]) AND (([112606_123006_R aw].ENTRY_DATE) Between [Enter Beginning Date] And [Enter Ending Date]));
Jan 17 '07 #5
nico5038
3,080 Recognized Expert Specialist
This groupby will make unique combinations of:
WeekEnding.[W/E], (DatePart("ww",[W/E])) AS WorkWeek and ZIP_5_DIG and ENTRY_UNIT and STOPCLOCK_FLG and DELIVERED_FLG and PU_DATE and ENTRY_DATE and DAYS_C
When you want just W/E, then you'll have to supply for the other fields an aggregation function like MIN(), MAX(), SUM(), etc.

Nic;o)
Jan 17 '07 #6
derekdeben
5 New Member
I tried both count & sum and it will not work???????????
Jan 17 '07 #7
nico5038
3,080 Recognized Expert Specialist
Try:

SELECT (DatePart("ww",[W/E])) AS WorkWeek, Sum( [112606_123006_R aw].DAYS_C)
FROM 112606_123006_R aw LEFT JOIN WeekEnding ON [112606_123006_R aw].ENTRY_DATE = WeekEnding.Date
GROUP BY (DatePart("ww",[W/E]))
HAVING ((([112606_123006_R aw].ENTRY_UNIT)=[Enter SCF]) AND (([112606_123006_R aw].ENTRY_DATE) Between [Enter Beginning Date] And [Enter Ending Date]));

It's the WeekEnding.[W/E] that's disturbing the grouping.

Nic;o)
Jan 17 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

3
6114
by: mark | last post by:
How do I get all fields on one page of a report? I have a report that has a column for each day of the week and 6 records for each day. I need each weekday's records returned on only one detail page. Instead I am getting a new table layout for each day of the week. I have tried grouping on every record and combination I can, manipulating the Group Properties but can't get it right. I have the entire report in the Detail Section, with...
1
2074
by: Brian Coy | last post by:
I am creating a database to track scrap on a daily basis at my plant. I have to provide a weekly scrap report with the amount of each part scrapped per day. I have the basic database set up, and am trying to generate a report. I have created a report that will show all the data. But I need to show either an empty group for the data on days that there is no scrap or a comment relating as much. My report is set up with a weekly...
8
3508
by: Mike MacSween | last post by:
tblCourses one to many to tblEvents. A course may have an intro workshop (a type of event), a mid course workshop, a final exam. Or any combination. Or something different in the future. At the moment the printed output is usually going to Word. It's turning into an unholy mess, because I'm having to prepare umpteen different Word templates, and the queries that drive them, depending on what events a course has.
3
5864
by: Bob | last post by:
I wish to group data on a report by week, month and year. Crystal reports has this ability as a built in function. Is there a quick way to do this in Access97/2000 VBA reports ? Thank you in advance, Bob.
7
2414
by: manning_news | last post by:
I've got a report that's not sorting correctly. I build a SQL statement and assign it to the recordsource in the Open event, sorting the data the way the user chooses. The user can choose up to 3 sorts using a form that opens before the report opens. When the report previews, it ignores the users' sort request and always sorts by the primary key even though ORDER BY is explicity set to another field other than primary key. If I copy...
5
4613
by: sara | last post by:
I have reports that run from a form where the user can choose a date range, or they run automatically for a week in the "Weekly Reports" option. I created 2 queries and 2 reports - one query uses the WeekEndDate to filter, and its associated report heading says "For the week Ending " & forms!frmPrintReports.getWeekEndDate. The other query selects the date range using "Between" and the 2 dates on the form. Its associated report header...
3
3271
by: Patonar | last post by:
Hi, I have a query which works out which orders are due to be delivered in a particular week. I would like to display this by week commencing which i can do with the following WHERE condition in the date field: <=(Date()) And >DateAdd('d',-5,(Date())) Now the customer would like to be able to see the previous six weeks data on the same report - i know i can find out the previous weeks
11
1256
by: Johna4969 | last post by:
I need to create a report using data in a date field as a header. The field is a week ending date with a corisponding hours worked for an employee. The report needs to list the fields as follows; Week Ending 01/05/08 01/12/08 01/19/08 etc John Doe 40 40 25 etc Jane Doe 45 20 40 etc I have seen some posts about doing this with a...
9
4485
by: prakashwadhwani | last post by:
Hi !! I'm about to develop a new project for a client. Should I go about it in Access 2003 or 2007 ? Purchasing it either for me or for my client is not a major consideration here ... what I'd like to know is the stability, speed & ease of use of both the products. I believe Access 2007 has a new file format too and that it may be slower.
0
8403
marktang
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...
0
8316
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8833
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
8509
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
8610
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...
1
6174
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4168
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
4327
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1730
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.