O'Reilly logo

Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started by Charlie Arehart, Raymond Camden, Ben Forta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Invoking Reports from Within ColdFusion Code

Being able to run reports in browsers is useful, but other reporting tools can do that, too. What makes ColdFusion reports unique is their ability to be altered at runtime.

Look at Listing 16.13. It uses a tag named <cfreport> to embed a report into a .cfm file.

Listing 16.13. Report1.cfm—Basic Report Invocation
<!---
Name:        Report1.cfm
Author:      Ben Forta
Description: Invoke a ColdFusion report
Created:     07/10/2007
--->

<cfreport template="Expenses.cfr"
          format="PDF" />

If you were to run this code, it would generate the same report as before, but now you’re generating it in your own CFML instead of it’s being generated automatically. Why is this of value? Look at Listing 16.14, a modified version of ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required