Monday, November 11, 2013

Creating a Tabular Report using ColdFusion Report Builder

In my previous two post we just learned how w just installed Report Builder and then connect Report Builder with our ColdFusion server.

If you want to see old posts please go from here #1(Report Builder installation) and #2(Set up Server in Report Builder

So, now it’s time to go for a simple example of ColdFusion reporting using Report Builder. Please follow the steps to generate a tabular report and use that in ColdFusion code.

 Click on File -> New in Report Builder, you will see a screen like below:

Go with “Report Creation Wizard” and click on “OK”.

You will see a next screen like below:
Click on “Query Builder” button.

Then we will see a new Query Builder screen for our report.
As shown in the picture, you can see all the available data sources and also you can write your own customize SQL query in the mentioned section. There is button “Test Query”. You can also test the query output by clicking that button. If your query has any problem then it will display error message.
After writing your SQL query just click on “Save” button.

 Then you will see another screen like below:

Here, you can select query columns which you want to in printable report.By using right side "Up" and "Down" arrow you can place column in a defined order. For now just forget it and click on “Next”.
·         We will see another screen as below:

Here, you can define any order by fields in your report. Let say I want to see first all arts which is not yet sold. By using the extreme right Up and Down arrow you can define the direction of the order by clause. Here, I want to see all sold items first so I made as descending order. It depends on your choice.

Click on “Next” to go to next screen.
·         Here is our next screen:
Just select the option as you see in screen and then click on “Next”. You will see another screen after that then click on “Next”.

·         You will see the next screen like below:
Here, in the text fields you have to put some descriptive name about your report. See the label and put the description text accordingly then click on “Finish”.

·         After, all these set up finally you see some different window like below:

In this screen we can customize our report header text and we can also format the display text in report. 

Let’s see how we can do that:
First click on #1: A new window will pop up like below
Here, I have used ColdFusion DateFormat() to formatting the displaying date.

Click on #2: A new pop up window will be displayed:
Here, I just changed column header from “ISSOLD” to “Sold”. So similarly we can change all the column header with some descriptive name.

Click on #3: A new pop up window will appear like below:
Here, we just used another ColdFusion function for display formatting of a field value. Similarly, you can apply your own logic on other fields if you want.

I have changed the column header and added display formatting function for header and cell values. Finally we will have the following screen:
Here, field names are changed and we can also see the display formatting function in applied area then  click on preview button to see the preview of the report. Then save the report. It will generate a “.cfr” file.

Next, how we will use generated template in our ColdFusion code. Go here...


  1. Dear , how I can add a second sheet to a report? (report builder)

    necessary, since the report is on 2 sheets .

    or is there a way to print two different reports into a single PDF ?

    Thank you.

  2. If you want your ex-girlfriend or ex-boyfriend to come crawling back to you on their knees (no matter why you broke up) you got to watch this video
    right away...

    (VIDEO) Get your ex back with TEXT messages?