473,664 Members | 3,028 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help with creating report in Access 2007

33 New Member
Hi friends, I am new to access and I need to create a report. Please pardon me for such a long post.Appreciate your patience.

I have a table in Access (MyTable) with data about products manufactured in three different sizes on 4 different assembly lines.

I need a report showing the total production of all 3 sizes on both shifts for Factory A and B separately, for a given month of a year .Same as the format specified in the attachment (Report Format)

I wrote the query as following, but it requires some modifications to get the desired output.

SELECT Mytable.Factory , Month([Date]) AS [Month], Mytable.Shift, Mytable.Line, Sum(Mytable.[Size A]) AS [Size A], Sum(Mytable.[Size B]) AS [Size B], Sum(Mytable.[Size C]) AS [Size C], Year([Date]) AS Year
FROM Mytable
GROUP BY Mytable.Factory , Month([Date]), Mytable.Shift, Mytable.Line, Year([Date])
ORDER BY Year([Date]),Month([Date]), [Mytable].Shift;

Please find my Output in the attachment (output) .Here, L4 is missing (because Fac A didn’t have any production in L4). But I would like to see L 4 in my report with the value 0..ie, Even if nothing was produced on the line display it on the report.

Please help me modify the query accordingly and create a customized report (as in Report Format) where user inputs the Factory, year and month to generate the report.

This would help me tremendously. It might not look that complex for an expert, but for me this is a herculean task. Thank you for all the help in advance.
Attached Images
File Type: jpg output.JPG (21.5 KB, 155 views)
File Type: jpg Report format.JPG (15.4 KB, 156 views)
File Type: jpg MyTable.JPG (26.4 KB, 156 views)
Feb 6 '10 #1
3 2132
nico5038
3,080 Recognized Expert Specialist
When you want to "force" output for a certain category, the general approach is to create a table with all categories. Next an outer join is created, holding all values for the category and only values for the "child" when present. Thus a NZ() function can be used to return a zero for not found values.

Getting the idea ?

Nic;o)
Feb 8 '10 #2
mulamootil
33 New Member
Thanks Nic;o. I explored what you suggested and got what I was looking for. I really appreciate your help.

Regards
Stan
Feb 14 '10 #3
nico5038
3,080 Recognized Expert Specialist
You're doing fine Stan, I see you are "learning the trade " quickly :-)

Nic;o)
Feb 14 '10 #4

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

Similar topics

71
5230
Cintury
by: Cintury | last post by:
Hello I am new to this forum. I am using Microsoft Access 2003 and Windows XP 2002 ver. I have 2 questions: 1) Is there always a substantial amount of visual basic coding to create a report in design view? (I ask because I am only familiar with "C/C++") 2) I am trying to create a report that will display the undistributed balances for a user entered month. There is already a similar report made which includes donor company, receiving...
5
2522
by: KewlToyZ | last post by:
Good day, I am stuck in a strange situation. SQL 2000 Server, creating a stored procedure to use in Crystal Reports 11. I am trying to build a report without creating a table or temprorary table in the database. Not too bad but ugly nonetheless. I succedded in creating the process using multiple stored procedures, but the report takes hours to run in Crystal which more less indicates I failed to get a workable solution. I have a few...
3
3151
by: ARC | last post by:
I'm having trouble here with Access 2007 and connecting to a different database. The code below works great IF the previous back-end database connection is still present and you are trying to connect to a new location (ie: datapath variable below). However, if you remove or even rename the old database, then launch your program, the code fails on the mytable.refreshlink line with an error 3044. (Description of that error is: 'C:\pc
4
4515
by: Fran | last post by:
I recently tried to use code for "Use a multi-select list box to filter a report" from Allen Browne in my database. I was able to add the code and adapt it to my needs, however I am getting an error. I click Ok and the report opens. I look in the design view and the filter is there but the IN equals "" (it is blank, the values are not in there)
2
1428
by: Bhishm | last post by:
Hi, I am creating a attendance sheet software for inhouse use. my data is like this:- ------------------------------------------------------------------------------------------------ | name | login time | logout time | ------------------------------------------------------------------------------------------------
1
1563
by: Grubsy4u | last post by:
Grubsy4u Newbie 7 Posts October 5th, 2007 11:31 AM #1 Report calculations --------------------------------------------------------------------------------
4
3943
by: syversda | last post by:
I have a report that runs a bunch of code to populate variables and then those variables are used as the control source in my report fields. for example var1 gets # of records in a table I have a field on my report called myfield1 and the control soure is = This has always worked in other versions of MS Access but now it throws #Name or #Error in some cases on the report. I've stepped through the code and the variables are getting...
5
2330
by: LadyIlsebet | last post by:
I'm not a fantastic Access developer, but I'm trying to help get Inventory and whatnot organized at work. They are used to 5 year budget plans that list out exactly what has to be purchased what year and how much it will cost. Currently these are kept in Excel and look like this | Inventory information (who, what, where) | 2008 | 2009 | 2010 | 2011| 2012 The cost for the item is displayed in the column in the year when it
1
1601
by: sjivanjee | last post by:
Help In Access 2007 - Report (Grouping and Sub Totaling) I have two table one stores student information and other one is for their attendance. In the attendance table their is a field called Attendance Status which has a value of P,A,Ex or L and Block which has a value of 1, 2, 3, 4 or 5. I am creating a report based on two tables. My report has group by student full name and sub group by attendance - i need to count how many A, Ex and L...
10
9115
by: Snoopy33 | last post by:
I have a DB that I developed on access XP (2002) and deployed over a year ago. No one has had problems printing any of the reports within the DB until we started loading 2007 on new computers. The access 2007 users cannot print one of the reports. This is maddening since I cannot duplicate the issue on any computer that runs 2003 or below. Is there something going on that I'm not seeing? Does anyone have any suggestions at all on...
0
8348
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
8861
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...
0
8778
jinu1996
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...
1
8549
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
8636
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
7375
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...
1
6187
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
4185
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
4351
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.