473,587 Members | 2,324 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Qyerying to get data for report

Hi,

I have recently being doing a lot of work in Excel so apologies if I
refer to things in Excel terms. I need to create a report and cannot
seem to get the data from my tables / queries in the right place to
get the report I need.

I have table / field structure as below
TblAccounts
Fields in TblAccounts - AccountID & AccountName

TblAssessments
Fields in TblAssessments - AccountID & AssessID

TblAssessmentVa lues
Fields in TblAssessmentVa lues - AssessID & ValueID & Value

Each account may have 0 - 50 assessments, and each assessment will
have 10 values.

I need to run a report that shows all assessments between certain
dates. (That's easy). However I then want to know how many of the
assessments were completed correctly eg. ones that do not have any
null values in the Value fields of the TblAssessmentVa lues.

My report could look like this;
AccountID AssessID CountofValuesCo mpleted

12345 1 9
12356 2 10
12345 3 4
12567 4 10

etc etc. From the report above I would know 2 of the assessments had
been completed correctly as two of them show 10 in the
CountOfValuesCo mpleted.

I have no idea where to start although I have been playing with this
all day!

Thanks in advance.

Jul 11 '07 #1
3 1592
keri wrote:
Hi,

I have recently being doing a lot of work in Excel so apologies if I
refer to things in Excel terms. I need to create a report and cannot
seem to get the data from my tables / queries in the right place to
get the report I need.

I have table / field structure as below
TblAccounts
Fields in TblAccounts - AccountID & AccountName

TblAssessments
Fields in TblAssessments - AccountID & AssessID

TblAssessmentVa lues
Fields in TblAssessmentVa lues - AssessID & ValueID & Value

Each account may have 0 - 50 assessments, and each assessment will
have 10 values.

I need to run a report that shows all assessments between certain
dates. (That's easy). However I then want to know how many of the
assessments were completed correctly eg. ones that do not have any
null values in the Value fields of the TblAssessmentVa lues.

My report could look like this;
AccountID AssessID CountofValuesCo mpleted

12345 1 9
12356 2 10
12345 3 4
12567 4 10

etc etc. From the report above I would know 2 of the assessments had
been completed correctly as two of them show 10 in the
CountOfValuesCo mpleted.

I have no idea where to start although I have been playing with this
all day!

Thanks in advance.
If I understand you correctly, I would create a query on
TblAssessmentVa lues.

Open the query builder and add TblAssessmentVa lues. Then drag down
AssessID 2 times. Then the Values field. Now enter in the column
containg the Values Field
ValuesCount : IIF(Not IsNull([Values],1,0)

From the menu select View/Totals. This will make this a totals query.
Under the first AssessID make it GroupBy. Under the second, select
Count. Under the ValuesCount column make it a Sum.

You now will have a total count of AssessIDs. You will have the count
of those completed. You also can subtract the count from completed to
get a not-completed count also.

Now you can create another query for the report with the tables
TblAccounts and TblAssessments. Add the TotalsQuery also. You can set
an Inner or Left join link on TotalsQuery. Dbl-Click on the
relationship line between TblAssessments and TotalsQuery and then select
all records must match or select All TblAssessments and those that match
in TotalsQuery. Filter as desired.
Jul 11 '07 #2
You imply from "completed correctly eg. ones that do not have any
null values in the Value fields of the TblAssessmentVa lues" that you create
records for a given AssessmentID prior to having a Value for it? And, if I
understand correctly, for your data to have meaning, AssessmentID would have
to be unique across all Accounts. Are both these the actual case?

Please clarify, and perhaps someone can offer a useful suggestion. Chances
are, you will use a Totals Query in your solution, but the details of the
solution will differ, depending on the details of your data / database.

Larry Linson
Microsoft Access MVP

"keri" <ke********@hot mail.comwrote in message
news:11******** **************@ r34g2000hsd.goo glegroups.com.. .
Hi,

I have recently being doing a lot of work in Excel so apologies if I
refer to things in Excel terms. I need to create a report and cannot
seem to get the data from my tables / queries in the right place to
get the report I need.

I have table / field structure as below
TblAccounts
Fields in TblAccounts - AccountID & AccountName

TblAssessments
Fields in TblAssessments - AccountID & AssessID

TblAssessmentVa lues
Fields in TblAssessmentVa lues - AssessID & ValueID & Value

Each account may have 0 - 50 assessments, and each assessment will
have 10 values.

I need to run a report that shows all assessments between certain
dates. (That's easy). However I then want to know how many of the
assessments were completed correctly eg. ones that do not have any
null values in the Value fields of the TblAssessmentVa lues.

My report could look like this;
AccountID AssessID CountofValuesCo mpleted

12345 1 9
12356 2 10
12345 3 4
12567 4 10

etc etc. From the report above I would know 2 of the assessments had
been completed correctly as two of them show 10 in the
CountOfValuesCo mpleted.

I have no idea where to start although I have been playing with this
all day!

Thanks in advance.

Jul 11 '07 #3
To clarify;
There are actually 13 possible assessment values. To be classed as
complete at least of 10 of these must not be null.

I'm not sure I understand your question about AssessmentID, however
each AccountID may have 0 - infinty assessments, and yes each
AssessmentID would be unique regardless of which account it was linked
to.

I hope this helps you help me!

Jul 11 '07 #4

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

Similar topics

3
6743
by: Thad | last post by:
I'm new to C# and I was trying to create a Crystal Report. I've designed a simple report and I've used several methods for attaching fields to the report at design time. I've used a DataSet that I've created by add new item, and I've used the add command and used an actual SQL statement, and I've used the OLEDB ADO and connected to my...
3
5233
by: Diggler | last post by:
I was working on a report that is populated with three different tables in a strongly-typed dataset. The tables are populated from custom objects rather than directly from SQL Server. I loop through the objects and add the rows one at a time. I then push the dataset to the Crystal Report. The report worked fine, until this morning. I...
6
5172
by: Ray | last post by:
Hi all, While I use the ReportDocument of vb.net to set filter to the data to the Crystal Report, it is successful for the first time while running the program. However, for the second time while running the program, when I set filter to other set of data, all the data is lost. Please help. Thanks a lot, Ray
0
1379
by: Ray | last post by:
Dear Bernie, Yes, if the same pfieldname is used. The same data will be filtered. But I only use the code shown you before. I have not used any dataset or datatable. How to fix the problem? Thanks a lot, Ray "Bernie Yaeger" <berniey@cherwellinc.com> ¦b¶l¥ó news:egBcd1QuEHA.3188@TK2MSFTNGP15.phx.gbl ¤¤¼¶¼g... > Hi Ray, >
1
17926
by: Rich | last post by:
Hello, I am trying to use the Reportviewer control. I have been following an example from the web, and the instructions from the help files on set up a ..rdlc and binding it to the reportviewer control. The help files state that in the form the contains the reportviewer control there is a tasks smart tags panel in design view. I don't...
0
14409
by: Grip | last post by:
Hi, I have gone throught the group and Microsoft's online help and have seen many suggestions but I am still seeking clarity: 1. I have an excel spreadsheet. Column A contains text that may be greater than 255 characters. 2. I have an access database. I link (not import) to the contents of the excel spreadsheet. In the design view in...
6
9405
by: Dave | last post by:
On my form I have combo boxes. These combo boxes, after updating them, populate respective listboxes that are located below the combo boxes on the same form. I am trying to use a "generate report" button located on my form to print all of the list box values (that have been updated via selection from combo boxes) from the form to the report....
4
2282
by: Andrew Meador - ASCPA, MCSE, MCP+I, Network+, A+ | last post by:
I have created a report. This report needs to display records between two dates entered by the user. I put two text boxes on the report so I can enter the start and end date - I set them to use an input mask of 'short date' format. The problem is that when I enter anything in these text boxes, as soon as the field looses focus, the text is...
3
18699
by: creative1 | last post by:
Here is how you create a complex data report that involves parent and child commands and you can update information at runtime. Its pretty straight forward to work with simple queries; however, working with complex reports is tricky Assumption: Reader of this article have basic knowledge of creating data reports. Creating a Parent-Child...
0
7918
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...
0
7843
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...
0
8340
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...
1
7967
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...
0
8220
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...
0
5392
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...
0
3840
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...
1
1452
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1185
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...

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.