takethapowerback
IS-IT--Management
Hey guys! Im a newbie at this coldfusion stuff and Im trying to use the <cfgraph> to generate some reports for work but I keep getting errors. If any of you guys can help me I would greatly appreciate it. Here's the code below..
<cfquery name="getresults" datasource="#db#">
SELECT tblAgent.AgentID, tblAgent.CallDate, tblProblem.ProblemTitle, tblProblem.ProblemDescription, tblProblem.ProblemTypeID, tblProblemType.ProblemType
FROM tblProblemType INNER JOIN (tblProblem INNER JOIN tblAgent ON tblProblem.ProblemID = tblAgent.ProblemID) ON tblProblemType.ProblemTypeID = tblProblem.ProblemTypeID
WHERE tblAgent.CallDate >= #CreateODBCDate(Form.StartDate)#
AND tblAgent.CallDate <= #CreateODBCDate(Form.EndDate)#
</cfquery>
<cfoutput>
<cfgraph
type="pie"
query="getresults"
valuecolumn="#getresults.recordcount#"
itemcolumn="ProblemType"
fileformat="jpg"
Title="Help Desk Report"
Borderwidth="1"
Depth="20">
</cfgraph>
</cfoutput>
<cfquery name="getresults" datasource="#db#">
SELECT tblAgent.AgentID, tblAgent.CallDate, tblProblem.ProblemTitle, tblProblem.ProblemDescription, tblProblem.ProblemTypeID, tblProblemType.ProblemType
FROM tblProblemType INNER JOIN (tblProblem INNER JOIN tblAgent ON tblProblem.ProblemID = tblAgent.ProblemID) ON tblProblemType.ProblemTypeID = tblProblem.ProblemTypeID
WHERE tblAgent.CallDate >= #CreateODBCDate(Form.StartDate)#
AND tblAgent.CallDate <= #CreateODBCDate(Form.EndDate)#
</cfquery>
<cfoutput>
<cfgraph
type="pie"
query="getresults"
valuecolumn="#getresults.recordcount#"
itemcolumn="ProblemType"
fileformat="jpg"
Title="Help Desk Report"
Borderwidth="1"
Depth="20">
</cfgraph>
</cfoutput>