Monday, November 11, 2013

Generate Report Using ColdFusion Report Template

In my following posts we learned up to creating a report template using ColdFusion report builder.

  1. Starting with Report Builder.
  2. Set up ColdFusion server in ColdFusion Report Builder.
  3. Creating a simple report template using ColdFusion Report Builder.
Now, it's time to use that report in our ColdFusion code.

Place the ".cfr" file in your project directory. See the following code to use the report template.

In the first section, I have written a SQL query for report then I am using the report template in cfreport tag to generate/display the report.

Here, if we will not use any query then it will display the report of the query which we had used during creating the report. If we are passing any query object to the cfreport tag then it will only consider the query object.

So, by using a customize queries we can generate multiple reports of the same type using ColdFusion reporting template. We can also pass parameter to a report. We will learn that in my future post.

Generated Report Screen Shot:

1 comment:

  1. Are you able to generate html page without saving it and displaying correctly with image/logo?

    ReplyDelete

Followers