473,397 Members | 2,068 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

graph / chart from query without summarising data

Dear All!
I have a query that holds test results for my students; each test is either a listening-test, reading-test, speaking-test or writing-test. All results are in % and already calculated by the query using the expression
Percentage: Results!Score*100/Assignments![out of]

I'd like to convert these results into a simple [:):):)] bar chart and I'd like to add this chart to each student's report card, which is essentially a simple Access-Report.

The query I want to use for the graph has these fields:

Students.StudentID: to link the graph to the student's report card
Subjects&Years.SubjectyearID: to identify the class the student is in; I might teach the same student in two different classes;this field serves as a further link between graph and studentreport card
Assignments.Skill_Area: to identify the type of test, i.e. reading/writing/listening/speaking
AssignmentDistribution.AssignmentDistributionDate: simply holds the date the test was administered
AssignmentDistribution.Type: to identify an assignment as a test, rather than a homework or some other assignment.

Unfortunately, I'm not yet good enough to tell the graph/chart-wizzard that it needn't summarise or format the data in any way, i just want it to show it in a simple bar graph, where
  • the value-axis on the left shows the values 0%,25%;50%,75%,100% - this would be the same for each and every graph
  • the category -axis at the bottom shows the assignment_distribution_dates, from left to right - this would also be the same for every graph
  • and the bars would represent the skill-areas - each graph would have the same number of bars but showing different test-results, using the %-values from the underlying query -

I've searched my trusty O'Reilly - Access Cookbook, my Access-4-Dummies but can't seem to find anything that helps me get this kind of graph done.

Is it possible?
Jun 19 '10 #1
4 2156
FishVal
2,653 Expert 2GB
It would be helpful to see the SQL expression of your query.

Kind regards.
Fish
Jun 21 '10 #2
Sorry, I can see how that might be helpful, so here it is:

SELECT Results!Score*100/Assignments![out of] AS Percentage, Results.StudentID, Assignments.[Skill-Area], [Assignment-Distribution].SubjectYearID, Results.AssignmentDistributionDate
FROM Assignments INNER JOIN ([Assignment-Distribution] INNER JOIN Results ON [Assignment-Distribution].AssignmentID = Results.AssignmentID) ON Assignments.AssignmentID = [Assignment-Distribution].AssignmentID
WHERE ((([Assignment-Distribution].SubjectYearID)=14) AND (([Assignment-Distribution].Type)="End-of-Unit-Test"))
ORDER BY Results.AssignmentDistributionDate;

The WHERE-clause is here because, this being a pilot-scheme, a learning-experience, for now I only want the data for one class, the class with the subjectYearID 14.

All assignments are stored in a table - tbl_assignemnts, in which assignmentID is the primary key.

tbl_assignments also holds information as to what the maximum score for each assignment might be; this is stored in the field 'out_of'.

But an assignment really only becomes 'active' - so to speak - once it has been paired up with a class (subject-year-ID)and given an "AssignmentDistributionDate" in the table "AssignmentDistribution".

A separate query then combines the AssignmentID from tbl_AssignmentDistribution with all StudentIDs for the relevant class and dumps the lot into tbl_results.

Then, when the assignment has been marked, a numerical result is stored in the field 'score' in the tbl_results.
This score is then taken to calculate a percentage.

Have I forgotten anything??

Thanks for reading
Jun 21 '10 #3
FishVal
2,653 Expert 2GB
Well. It is still somewhat unclear to me.
Could you please post an example of data stored in those three tables and a resulting dataset returned by the query?
Jun 23 '10 #4
O.k, here it goes, I hope this format is acceptable, I wouldn't know how else to describe it. I do appologise for any database design flaws and am grateful for any improvement tips.

The following tables are linked (1-to-many) via their individual -ID fields; these fields are also primary key fields

tbl.assignments (holds all info relating to assignments, in other words, the tests that my graph should display
AssignmentID - 1
Assignment - Readingtest on Eiffel Tower
Out_of - 10
Skill-Area - Reading (there are 4 skill areas (read/writ/list/speak) and they are all stored in a look-up field

tbl.SubjectYears is a 'junction-table' to pair up the subjects I teach and the age-groups I teach. Each SubjectYearID represents a single class - without students in it.
SubjectYearID - 1
SubjectID - 1 (French)
YearGroupID - 2 (5th grade)

tbl.teachingGroups - is the 'container' for classes with students in it
TeachingGroupID - 1
SubjectYearGroupID - 1 (French/5th grade)
StudentID - 1 (Freddy French)

tbl.AssignmentDistribution
AssignmentID - 1 (Reading Test on Eiffel Tower)
SubjectYearID - 1 (French / 5th Grade)
AssignmentDistributionDate - 23/06/2010
AssignmentType - Test (there are other types - homework; classwork etc, but not enough types to warrant a separate table)

tbl.Results the first 3 fields are 'shared primary key fields - so that Freddy can do the Reading test again on another date, if he fails; unfortunately, in today's world, I have to also keep a record of how many goes he has before he actually passes the test.
AssignmentID - 1 (Reading Test on Eiffel Tower)
StudentID - 1 (Freddy French)
AssignmentDistributionDate - 23/06/2010
Score - 8
================================================== ===
Now for the Query - qryFrenchModuleTests
The SQL-statment

SELECT Results!Score*100/Assignments![out of] AS Percentage, Results.StudentID, Assignments.[Skill-Area], [Assignment-Distribution].SubjectYearID, Results.AssignmentDistributionDate
FROM Assignments INNER JOIN ([Assignment-Distribution] INNER JOIN Results ON [Assignment-Distribution].AssignmentID = Results.AssignmentID) ON Assignments.AssignmentID = [Assignment-Distribution].AssignmentID
WHERE ((([Assignment-Distribution].SubjectYearID)=14) AND (([Assignment-Distribution].Type)="End-of-Unit-Test"))
ORDER BY Results.AssignmentDistributionDate;

returns data looking like this:


Skill-Area / % / StudentID / SubjYearID / Date
Reading / 93.33 / 375 / 14 / 16-Nov-09
Writing / 91.67 / 375 / 14 / 16-Nov-09
Speaking / 76.67 / 375 / 14 / 16-Nov-09
Listening / 86.67 / 375 / 14 / 16-Nov-09
Reading / 80.00 / 376 / 14 / 16-Nov-09

This query sorts all tests according to Student, so Freddy French (StudentID 375)has his 4 tests listed before the same 4 tests are listed for StudentID 376.

Does this help?

I would now like to learn how to display this data in simple bar-chart from but somehow can't get it done.
Jun 23 '10 #5

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

Similar topics

0
by: krystoffff | last post by:
Hi all For speed reasons, I would like to rewrite the following query without the subquery : SELECT * FROM table1 WHERE field1 NOT IN (SELECT field1 FROM table2 where field2=X); I thought...
2
by: Dave | last post by:
I'm trying to follow the examples in VBAGRP9.CHM and/or VBAGR10.CHM with no success. I'm trying to Chage the Legend Colors based on Content so that I can establish a certain color format on...
3
by: sam | last post by:
I just wonder where could I find sample of ASP.Net Graph / Chart (Line, Bar, Pie) beside microsoft.com? How hard to coding ASP.Net Chart? Or better to do at MS SQL Server 2000 Reporting...
2
by: aoao | last post by:
I need to make a new database at the beginning of every year but have forgotten how to do this quickly and efficiently. I have a database with about 10 tables, 10 forms related to the 10 tables...
2
by: ruthboaz | last post by:
Hi, My database is in SQL Server with Access as front end. I have a Microsoft Graph Chart for which the data is picked up with a query from the SQL Server. In the DataSheet the first row is...
2
by: stupidintern | last post by:
Hi, This is my first post here so please be patient. Here is my question: I am trying to include a chart in my VB form. I do it this way: I drop the Microsoft Graph Chart Control (from Unbound...
1
by: Luqman | last post by:
I have created a Insert Query in Sql Data Source using Oracle Database, with the parameters, and its connected with DetailView Control. When I try to Insert through DetailView Control, Illegal...
0
by: Alexandre Brisebois | last post by:
I have been trying to use Linq o SQL to query an XML data column I currently have in my DB, but it seems that Linq to SQL sees a typed xml column as an XElement, I don't want to get the full...
0
by: fnzeee | last post by:
I have a table of data with the following fields: Resource Name 1, Start Date 1, End Date 1, % Allocated 1, Resource Name 2, Start Date 2, End Date 2, % Allocated 2, Resource Name 3, Start Date...
1
by: baburmm | last post by:
Hi all, Can any one tell me, Export datas to a Excel file using query without openrowset method is there any other methods are posible for creating an Excel file to export it Thanks,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
0
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...
0
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,...

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.