Identical graph repeated for each record!

Paine

Registered User.
Local time
Today, 12:36
Joined
Jan 21, 2010
Messages
29
Hi everyone,

This is probably a very simple design flaw, but I've been pulling my hair out trying to fix it the last couple of days and I haven't had much luck! If someone could point out where I'm going wrong, it would mean a lot.

Our database tracks the progress of learners on their courses. For the sake of simplicity, we have three tables: Learners, Courses, and Enrolments (easy peasy stuff!)

Teachers access a form called Courses and have the option of entering a date range in two unbound boxes, which links in to a query called 'Course Statistics' (within course statistics, the criteria link back to [Forms]![Courses]![Course Code], as well as start date being before [forms]![Courses]![betweenStart] and [forms![Courses]![betweenEnd]).

This all works great so far - teachers put in their dates, the query shows data relevent to just that course within the date range.

Now is where it goes wrong!

I've created a report (from scratch, not using the wizard) which uses [Course Statistics] query as a record source. It has two simple bar graphs on it - one which shows the ethnicity of enrolments, the other which shows the Outcomes. These display correctly... but are repeated the same number of times as the number of enrolments to that course (e.g. brickwork, 15 enrolments, 15 identical graphs). I've tried using grouping by [Course Code] and also also page breaks, but no luck.

I've not made a report before, so perhaps this is a very basic error, probably with my design.

My ultimate aim is that there will be a button on the Courses Form that previews this report, so teachers can navigate to a particular course and then print off a couple of bar charts showing data from a date range that suits their course files.

Thanks in anticipation!




Steve
 
If the Report's Record Source data used for Graph Chart also the Chart will repeat for each record on the source table/query. If you don't want this to happen then you should remove the table/query reference from the Record Source property of the Report.

But, if you want to show separate Graphs for each record then select the Chart Object and set the Link Master Field and Link Child Field property values to the Key Field Name like:

Link Master Field = EmployeeID
Link Child Field = EmployeeID

This will ensure that the Chart displayed on a report page correspond to the current record on the Report.

Check the following links for Graph Chart basics:

http://www.msaccesstips.com/2007/08/ms-access-and-graph-charts/
http://www.msaccesstips.com/2007/09/ms-access-and-graph-charts2/
 
Thanks - I amended the record source and basically pulled all the fields through from a form. This works fine now! :-)
 

Users who are viewing this thread

Back
Top Bottom