- Starting with Report Builder.
- Set up ColdFusion server in ColdFusion Report Builder.
- Creating a simple report template using ColdFusion Report Builder.
Place the ".cfr" file in your project directory. See the following code to use the report template.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfquery name="arts" datasource="cfartgallery"> | |
SELECT | |
ART.ARTID AS ID, | |
ARTIST.FIRSTNAME AS ARTISTNAME, | |
ART.ARTNAME, | |
ART.DESCRIPTION, | |
ART.ISSOLD, | |
ART.PRICE | |
FROM | |
APP.ART AS ART | |
INNER JOIN | |
APP.ARTISTS AS ARTIST ON ART.ARTISTID = ARTIST.ARTISTID | |
ORDER BY ART.ISSOLD ASC | |
</cfquery> | |
<cfreport format="pdf" template="ArtDetails.cfr" query="arts" /> |
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:
Are you able to generate html page without saving it and displaying correctly with image/logo?
ReplyDelete