
1054
DEVELOPING
COLDFUSION 9 APPLICATIONS
Working with Documents, Charts, and Reports
Las
t
upda
te
d 8/5/2010
<!--- The following query extracts employee data from the cfdocexamples
database. --->
<cfquery name="GetSalaryDetails" datasource="cfdocexamples">
SELECT Departmt.Dept_Name,
Employee.FirstName,
Employee.LastName,
Employee.StartDate,
Employee.Salary,
Employee.Contract
From Departmt, Employee
Where Departmt.Dept_ID = Employee.Dept_ID
ORDER BY Employee.LastName, Employee.Firstname
</cfquery>
<!--- The following code creates a presentation with three presenters. --->
<cfpresentation title="Employee Satisfaction" primaryColor="##0000FF" glowColor="##FF00FF"
lightColor="##FFFF00" showoutline="no">
<cfpresenter name="Jeff" title="CFO" email="[email protected]"
logo="../cfdocs/getting_started/photos/somewhere.jpg"
image="../cfdocs/images/artgallery/jeff01.jpg">
<cfpresenter name="Lori" title="VP Marketing" email="[email protected]"
logo="../cfdocs/getting_started/photos/somewhere.jpg"
image="../cfdocs/images/artgallery/lori01.jpg">
<cfpresenter name="Paul" title="VP Sales" email="[email protected]"
logo="../cfdocs/getting_started/photos/somewhere.jpg"
image="../cfdocs/images/artgallery/paul01.jpg">
<!--- The following code creates the first slide in the presentation
from HTML. --->
<cfpresentationslide title="Introduction" presenter="Jeff"
audio="myAudio1.mp3" duration="5">
<h3>Introduction</h3>
<table>
<tr><td>
<ul>
<li>Company Overview</li>
<li>Salary by Department</li>
<li>Employee Salary Details</li>
</ul>
</td></tr>
</table>
</cfpresentationslide>
<!--- The following code creates the second slide in the presentation.
The chart is populated with data from the database query. --->
<cfpresentationslide title="Salary by Department" presenter="Lori"
duration="5" audio="myAudio3.mp3">
<h3>Salary by Department</h3>
<cfchart format="jpg" xaxistitle="Department" yaxistitle="Salary">
<cfchartseries type="bar" query="GetSalaryDetails"
itemcolumn="Dept_Name" valuecolumn="salary">
</cfchartseries>
</cfchart>
</cfpresentationslide>
<!--- The following code creates the third slide in the presentation. The table is populated
with data from the query. The table also contains an image located relative to the CFM page on