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...

5 comments:

  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.

    ReplyDelete
  2. I was surfing net and fortunately came across this site and found very interesting stuff here. Its really fun to read. I enjoyed a lot. Thanks for sharing this wonderful information. custom pool builder spicewood tx

    ReplyDelete
  3. Use this diet hack to drop 2 lb of fat in just 8 hours

    More than 160k men and women are losing weight with a simple and secret "liquids hack" to lose 1-2 lbs every night as they sleep.

    It's scientific and it works with anybody.

    You can do it yourself by following these easy steps:

    1) Go get a glass and fill it up with water half glass

    2) Proceed to learn this strange hack

    so you'll become 1-2 lbs thinner the next day!

    ReplyDelete
  4. As reported by Stanford Medical, It is really the ONLY reason women in this country get to live 10 years more and weigh an average of 19 kilos less than we do.

    (Just so you know, it has absolutely NOTHING to do with genetics or some secret diet and EVERYTHING about "HOW" they are eating.)

    BTW, What I said is "HOW", and not "WHAT"...

    Click on this link to discover if this brief test can help you decipher your true weight loss potential

    ReplyDelete
  5. This way my friend Wesley Virgin's biography launches with this shocking and controversial VIDEO.

    As a matter of fact, Wesley was in the military-and shortly after leaving-he unveiled hidden, "MIND CONTROL" tactics that the government and others used to get everything they want.

    THESE are the same methods tons of celebrities (notably those who "became famous out of nothing") and top business people used to become rich and famous.

    You probably know how you utilize only 10% of your brain.

    Mostly, that's because most of your BRAINPOWER is UNCONSCIOUS.

    Maybe this expression has even taken place INSIDE OF YOUR very own head... as it did in my good friend Wesley Virgin's head seven years ago, while riding a non-registered, beat-up garbage bucket of a vehicle with a suspended driver's license and with $3.20 on his bank card.

    "I'm so frustrated with living paycheck to paycheck! When will I finally make it?"

    You've been a part of those those types of questions, ain't it right?

    Your success story is going to start. All you have to do is in YOURSELF.

    CLICK HERE To Find Out How To Become A MILLIONAIRE

    ReplyDelete

Followers