Sample presentations

This section provides two sample presentations.

Example 1

The following example creates a simple presentation that incorporates data retrieved from the cfdocexamples database. It shows how to perform the following tasks:

  • Create slides generated from HTML and CFML.
  • Add images to slides.
  • Add charts and tables with data extracted from a database.
  • Add audio tracks to individual slides.

<!--- 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="jeff@company.com"
logo="../cfdocs/getting_started/photos/somewhere.jpg"
image="../cfdocs/images/artgallery/jeff01.jpg">
<cfpresenter name="Lori" title="VP Marketing" email="lori@company.com"
logo="../cfdocs/getting_started/photos/somewhere.jpg"
image="../cfdocs/images/artgallery/lori01.jpg">
<cfpresenter name="Paul" title="VP Sales" email="paul@company.com"
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 the server. --->
<cfpresentationslide title="Salary Details" presenter="Paul"
duration="10" audio="myAudio1.mp3">
<h3>Employee Salary Details</h3>
<table border cellspacing=0 cellpadding=5 valign="top">
<tr>
<td>
<table border cellspacing=0 cellpadding=5 valign="top">
<tr>
<th>Employee Name</th>
<th>Start Date</th>
<th>Salary</th>
<th>Department</th>
<th>Contract?</th>
</tr>
<cfoutput query="GetSalaryDetails">
<tr>
<td>#FirstName# #LastName#</td>
<td>#dateFormat(StartDate, "mm/dd/yyyy")#</td>
<td>#numberFormat(Salary, "$9999,9999")#</td>
<td>#dept_name#</td>
<td>#Contract#</td>
</tr></cfoutput>
</table>
</td>
<td width="200" >
<img src="images/raquel02.jpg"/>
</td>
</table>
</cfpresentationslide>
</cfpresentation>

Example 2

The following example shows how to create a simple sales presentation with data from the cfartgallery database. Specifically, it shows how to perform the following tasks:

  • Create slides generated from HTML and CFML.
  • Create a slide from a URL that returns HTML content.
  • Add charts with data extracted from a database and a query of queries.
  • Add video and audio tracks to individual slides.

    <!--- The following query extracts data from the cfartgallery database. --->
    <cfquery name="artwork" datasource="cfartgallery">
    SELECT FIRSTNAME || ' '|| LASTNAME AS FULLNAME, ARTISTS.ARTISTID, ARTNAME, PRICE, ISSOLD
    FROM ARTISTS, ART
    WHERE ARTISTS.ARTISTID = ART.ARTISTID
    ORDER BY LASTNAME
    </cfquery>

    <!--- The following query of queries determines the total dollar amount of
    sales per artist. --->
    <cfquery dbtype="query" name="artistname">
    SELECT FULLNAME,
    SUM(PRICE) AS totalSale
    FROM ARTWORK
    WHERE ISSOLD = 1
    GROUP BY FULLNAME
    ORDER BY totalSale
    </cfquery>

    <!--- The following code determines the look of the slide presentation. ColdFusion displays the slide presentation directly in the browser because no destination is specified. The title appears above the presenter information. --->
    <cfpresentation title="Art Sales Presentation" primaryColor="##0000FF" glowColor="##FF00FF" lightColor="##FFFF00" showOutline="yes" showNotes="yes">

    <!--- The following code defines the presenter information. You can assign each presenter to one or more slides. --->
    <cfpresenter name="Aiden" title="Artist" email="Aiden@artgallery.com" image="../cfdocs/images/artgallery/aiden01.jpg">
    <cfpresenter name="Raquel" title="Artist" email="raquel@artgallery.com" image="../cfdocs/images/artgallery/raquel05.jpg">
    <cfpresenter name="Paul" title="Artist" email="paul@artgallery.com" image="../cfdocs/images/artgallery/paul01.jpg">

    <!--- The following code defines the content for the first slide in the presentation. The duration of the slide determines how long the slide plays before proceeding to the next slide. The audio plays for the duration of the slide. --->
    <cfpresentationslide title="Introduction" presenter="Aiden" duration="5" audio="myAudio1.mp3">
    <h3>Introduction</h3>
    <table>
    <tr><td>
    <ul>
    <li>Art Sales Overview</li>
    <li>Total Sales</li>
    <li>Total Sales by Artist</li>
    <li>Conclusion</li>
    </ul>
    </td>
    <td><img src="../cfdocs/images/artgallery/maxwell01.jpg"/></td></tr>
    </table>
    </cfpresentationslide>

    <!--- The following code generates the second slide in the presentation from an HTML file located on an external website. --->
    <cfpresentationslide title="Artwork Sales Overview" presenter="Raquel" audio="myAudio2.mp3" duration="5" src="http://www.louvre.com/index.html"/>

    <!--- The following code generates the third slide in the presentation, which contains a pie chart with data extracted from the initial database query. ColdFusion runs the video defined in the cfpresentationslide tag in place of the presenter image defined in the cfpresenter tag. --->
    <cfpresentationslide title="Total Artwork Sold" presenter="Aiden"
    duration="5" video="video1.flv">
    <h3>Total Sales</h3>
    <cfchart format="jpg" chartwidth="500" show3d="yes">
    <cfchartseries type="pie" query="artwork"
    colorlist="##00FFFF,##FF00FF" itemcolumn="issold"
    valuecolumn="price"/>
    </cfchart>
    </cfpresentationslide>

    <!--- The following code generates the fourth slide in the presentation with
    data extracted from the query of queries. --->
    <cfpresentationslide title="Sales by Artist" presenter="Paul"
    duration="5" audio="myAudio3.mp3">
    <h3>Total Sales by Artist</h3>
    <table border cellspacing=10 cellpadding=0>
    <TR>
    <TD>
    <table border cellspacing=0 cellpadding=5>
    <tr>
    <th>Artist Name</th>
    <th>Total Sales</th>
    </tr>
    <tr>
    <cfoutput query="artistname">
    <td>#FULLNAME#</td>
    <td>#dollarFormat(totalSale)#</td>
    </tr>
    </cfoutput>
    </table>
    </td>
    <td>
    <cfchart format="jpg" xaxistitle="Artist" yaxistitle="Total Sales"
    chartwidth="400">
    <cfchartseries type="bar" query="artistname"
    itemcolumn="fullname" valuecolumn="totalSale"/>
    </cfchart>
    </td>
    </tr>
    </table>
    </cfpresentationslide>

    <!--- The following code defines the final slide in the presentation. This slide does not have a presenter assigned to it. --->
    <cfpresentationslide title="Conclusion" duration="1" notes="Special thanks to Lori and Jeff for contributing their art and expertise.">
    <h1>Great Job Team!</h1>
    <p><img src="../cfdocs/images/artgallery/paul05.jpg"></p>
    </cfpresentationslide>
    </cfpresentation>

     

Get help faster and easier

New user?