- see footer for list info -<
Just doing a similar thing for another part of the DfES. With CFGRAPH
the graph is produced from two columns of data, 'value' and 'item'. With
a query it is used like so:
<cfgraph type="line" query="myQuery" valueColumn="valueColumnInQuery"
itemColumn="LabelColumnInQuery">
I assume CFCHART works the same way. I assume your two columns are
nVisits and LEAseniorStaff, your SQL in that case should be something like:
SELECT count(tblSchools.id)
tblVisitors.VisitorName
FROM tblSchools
...// inner joins
WHERE //
GROUP BY tblVisitors.VisitorName
Paul Swingewood wrote:
- see footer for list info -<
Hello.
I am trying to develop a reporting page that shows reports fetched
between two dates.
The idea is to show a graph of visits to schools by LEA senior staff.
I have been reading up on cfchart (mx6.1) and it seems ffairly
straight forward however ....
The database is a sort of calendar which holds school visits.
I want the user to be able to select 2 dates start and end and show a
graph which displays the visitors on the x axis and vists on the y axis.
I think the cfchart needs this data presented correctly to work (I
think) so how do I 'group' the number of visits for each visitor?
I have a query like this ....
<cfquery name="GetEvents" datasource="#application.CalendarDSN#">
SELECT cfpagesSchools.dbo.tblSchools.SchoolName,
cfpagesSchools.dbo.tblSchools.SchoolIDPK,
dbo.tblEvent.EventIDPK,
dbo.tblEvent.SchoolIDFK,
dbo.tblEvent.EventName,
dbo.tblEvent.StartDateTime,
dbo.tblEvent.EndDateTime,
Day(tblEvent.StartDateTime) AS EventStartDay,
Day(tblEvent.EndDateTime) AS EventEndDay,
dbo.tblVisitors.VisitorName
FROM cfpagesSchools.dbo.tblSchools
INNER JOIN dbo.tblEvent ON cfpagesSchools.dbo.tblSchools.SchoolIDPK =
dbo.tblEvent.SchoolIDFK
INNER JOIN dbo.tblVisitors ON dbo.tblEvent.VisitorIDFK =
dbo.tblVisitors.VisitorIDPK
WHERE (tblevent.StartDateTime BETWEEN CONVERT(DATETIME, #StartDate#,
102)AND CONVERT(DATETIME,#EndDateTime#,102))
ORDER BY StartDateTime
</cfquery>
What do I need to do to get this into cfchart ...?
Regards - Paul
_______________________________________________
For details on ALL mailing lists and for joining or leaving lists, go
to http://list.cfdeveloper.co.uk/mailman/listinfo
--
CFDeveloper Sponsors:-
- Hosting provided by www.cfmxhosting.co.uk -<
- Forum provided by www.fusetalk.com -<
- DHTML Menus provided by www.APYCOM.com -<
- Lists hosted by www.Gradwell.com -<
- CFdeveloper is run by Russ Michaels, feel free to volunteer your
help -<
_______________________________________________
For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo
--
CFDeveloper Sponsors:-
- Hosting provided by www.cfmxhosting.co.uk -<
- Forum provided by www.fusetalk.com -<
- DHTML Menus provided by www.APYCOM.com -<
- Lists hosted by www.Gradwell.com -<
- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<