Вы находитесь на странице: 1из 38

2009

Getting Started with Actuate BIRT


A beginners guide to the commercial Actuate BIRT implementation. Here I cover how to download and install the software and create a well formatted listing report with a Flash chart whilst detailing solutions to some of the common problems you may find along the way.

Paul Bappoo Paul@Bappoo.com http://www.BirtReporting.com October 2009

Getting Started with Actuate BIRT

CONTENTS
How To Contact The Author .......................................................................................................................... 4 Introduction ................................................................................................................................................. 5 What to download........................................................................................................................................ 6 BIRT Designer Professional........................................................................................................................ 8 Interactive Report Viewer ......................................................................................................................... 8 iServerExpress .......................................................................................................................................... 8 Installation ................................................................................................................................................... 9 Designing my first report .............................................................................................................................. 9 Creating a project ................................................................................................................................... 10 Creating a report .................................................................................................................................... 12 Creating a Data Source............................................................................................................................ 14 Creating a Data Set ................................................................................................................................. 16 Applying Filters ....................................................................................................................................... 18 Adding data to the report ....................................................................................................................... 19 Grouping Data ........................................................................................................................................ 21 Augmenting a data set ............................................................................................................................ 22 Simple Formatting .................................................................................................................................. 25 Flash Charts ............................................................................................................................................ 28 Computed Columns ................................................................................................................................ 33 Conclusion.................................................................................................................................................. 37 Coming Soon .............................................................................................................................................. 37 Further Assistance ...................................................................................................................................... 38

Page | 2

Getting Started with Actuate BIRT

Paul Bappoo Getting Started with Actuate BIRT


COPYRIGHT 2009 by Paul Bappoo, all rights reserved.
This guide is furnished under license and may be used or copied only in accordance with the terms of such license. The content of this guide is furnished for informational use only, is subject to change without notice, and should not be construed as a commitment by the author. The author assumes no responsibility or liability for any errors or inaccuracies that may appear in this guide. Except as permitted by such license, no part of this publication may be reproduced, stored in a retrieval system or transmitted, in any form or by any means, electronic, mechanical, recording or otherwise, without the prior written permission of the author. All product and company names are trademarks or registered trademarks of their respective holders.

Page | 3

Getting Started with Actuate BIRT

HOW TO CONTACT THE AUTHOR

Email: Paul@Bappoo.com

Web Site: http://www.BirtReporting.com

Paul Bappoo has been an international technical software consultant for over 30 years and has an interest in software design, BIRT reporting, enterprise application integration, automated software testing, computer based training and enterprise system implementation.

Page | 4

Getting Started with Actuate BIRT

INTRODUCTION

After seeing a demonstration of the Actuate implementation of BIRT at a recent IBM Maximo user group meeting and having taken a look at the free open source version of the software and liked it I decided next to install a trial version of the commercial Actuate BIRT implementation to see how it differed from the free version and what benefits it added. If youve not read my previous reports yet then please feel free to download them from:

http://www.BIRTReporting.com

Ive had a good play around with the free open source software in the Eclipse environment and now it is time to download and play around with the Actuate commercial implementation. I have been very impressed with what it is possible to achieve with the free software and I know that the interactive Flash based charts are certainly one of the things that the commercial implementation promises to add I am quite excited to see how these are implemented but I am also keen to experience the little things that may or may not be added in this release.

Page | 5

Getting Started with Actuate BIRT

WHAT TO DOWNLOAD

At first I went to www.birt-exchange.com to see what I needed to download and immediately I noticed that there were several options available to me, which I found a little confusing from the off. Ideally one big friendly download button would have been nice but it seems that Actuate have divided things up into a number of different packages for different purposes. So in order to find out what I needed I had to spend a while reading documents and trying to decide which version I should go for. I like to get started quickly with software as there is so much rubbish out there and I want to either move forward or eliminate quickly so as not to waste valuable time with long downloads, installations and reading countless tutorials. Plus I dont want to spend too much time learning anything! Software should be intuitive and its use come naturally. However it seems that a bit of reading and learning is inevitable in this case and hats off to the Actuate marketing folks for creating just enough interest for me to move on at this stage and learn more about the product without giving up through information overload. Clearly as a software author you want people to be invested in terms of time and knowledge in your products because this is what drives take up and usage and I can admit that Actuate seem to have the mix about right. Thankfully Actuate publish some good documents about the differences between the products in order to help you make your selection, I started off with this one: http://www.birt-exchange.com/download/BIRT-Designers-Comparison-Table.pdf I tend to like fully featured software, especially from a review perspective so I thought I would go for the option with Professional in the title, it also seemed to have a lot of ticks in boxes on the comparison chart! So tentatively I made and early stage decision to download the Actuate BIRT Report Designer Professional Next I noticed that I needed to select a BIRT deployment option, I wasnt sure what this was about because with my earlier investigation into Eclipse BIRT there was no such thing you simply placed your completed reports on the web server. So again I needed to read through a document to understand what this was all about and make a choice. Here is the headline text from Birt-Exchange.com that introduces the subject:
Three products help execute and render BIRT reports. The BIRT Report Engine is a collection of Java classes and API's. The BIRT Deployment Kit is a lightweight Java EE report repository. BIRT iServer Express is a fullfeatured report server for scheduling and securing reports.

Page | 6

Getting Started with Actuate BIRT

It appears that the major functionality provided by the deployment layer is to allow reports to be scheduled, have security applied and to be stored into personal repositories by end users. There were several options available and initially not wanting to go for something that had server in the title as this sounded like it will install huge amounts of software on my limited virtual PC, I eventually allowed curiosity to get the better of me and plumped for the Actuate iServer Express at least it is an express version, which sounds like it will have a smaller footprint than the Enterprise version! A little later on I discovered that I actually dont need a deployment solution in order to publish my reports as I can indeed simply put the reports I design with the Actuate designer into my Tomcat server and they will be accessible to my viewers. Well thats how it looks at the moment, well see! Heres the comparison chart for the deployment options http://www.birt-exchange.com/be/download/Deployment-Product-Comparison-Table.pdf And finally I needed to select a viewer, no competition for this one, the whole thing that turned me on to BIRT in the first place was the very fancy ability it has to let users interact with the reports and only the top level viewer appears to offer all this functionality so the Actuate BIRT Interactive Viewer it is then! Heres the comparison chart http://www.birt-exchange.com/be/download/Viewer-Product-Comparison-Table.pdf Whilst looking at these charts I noticed the costs associated with the various pieces of software. This stuff is not cheap! I am beginning to understand the rather clever marketing methodology behind Actuates support of the Open Source BIRT project. It seems to be along the lines of give away a lite version and sell the more advanced stuff. But no complaints there I believe that software developers deserve to make a living and by producing these tools they help us to make a living and when you look at the costs of the kind of software that the advanced Actuate tools would be used with, it doesnt seem so costly after all. To help you make your decision there are some video demonstrations available online. The quality between videos varies, some have audio, some dont, some played straight away and others didnt that might just be my machine of course so see how you get on with them. Spending 30 minutes with the videos gave me a good overview and solidified my download decisions. The videos are available here: http://www.birt-exchange.com/be/demos/all-demos/

Page | 7

Getting Started with Actuate BIRT

So my ultimate decision on which products to download for review were:

BIRT DESIGNER PROFESSIONAL


Design reports with Flash object support 433 Mb http://www.birt-exchange.com/be/downloads/birt-report-designers/?articleid=17321

INTERACTIVE REPORT VIEWER


Option 3 with iServer express 220 Mb http://www.birt-exchange.com/be/downloads/birt-report-viewers/?articleid=17323

ISERVEREXPRESS
For on demand and scheduled reports - 220Mb http://www.birt-exchange.com/be/downloads/birt-deployment-options/

Even though I downloaded the iServer I will only deploy it after Ive used the interactive viewer with reports hosted on Tomcat, so that I can see what additional features it gives me.

One interesting thing I noticed was that the Interactive viewer and the iServer downloads have the same file name and the interactive viewer refers to iServerExpress in the description so I am wondering if the interactive viewer contains iServerExpress and if I have just spent half an hour downloading something I dont need. I will report on this later on once I unpack the iServer software and install it.

Page | 8

Getting Started with Actuate BIRT

INSTALLATION

I started by running ActuateBIRTReportDesignerPro.exe and accepted all the defaults during the installation. Once the installation wizard was complete I launched the program from the Windows menu and it just worked! This is the first obvious benefit of using the Actuate package over piecing together all the pieces to install the Eclipse build.

DESIGNING MY FIRST REPORT

Im pleased to say that the designer interface is pretty much the same as the one I am used to in the Eclipse BIRT implementation so I have already built up familiarity with this. In fact I am surprised at how much knowledge I have built up after only a few hours of using the Eclipse designer and that it is immediately transferrable to this version, I was able to get started building a report very quickly.

Page | 9

Getting Started with Actuate BIRT

CREATING A PROJECT

Initially I selected File/New Project and navigated to the Report Project option.

Page | 10

Getting Started with Actuate BIRT

I named my project ActuateBIRTTest

And just as expected my project appeared in my navigator.

Page | 11

Getting Started with Actuate BIRT

CREATING A REPORT

Then I selected File/New/Report and named my report ActuateTest.

Page | 12

Getting Started with Actuate BIRT

I was then presented with a list of predefined templates which seem similar to the Eclipse implementation

Page | 13

Getting Started with Actuate BIRT

CREATING A DATA SOURCE


Next I selected Data Sources, right clicked and added a new data source Now previously with Eclipse I had to download a JDBC driver for SQL Server, but here I can select JDBC Data Source as a built in option. Again this is a nice touch over the Eclipse build.

I referred to the online help during this process just to see how helpful it was and I am pleased to report that it is clear, easy to follow and detailed. I also love the way it is embedded into the currently open window.

Page | 14

Getting Started with Actuate BIRT

Actuate have provided drivers for common data sources right out of the box, so no fiddling around to get my data driver set up. On selecting SQL server the connection string was populated into the driver URL field waiting for me to specify my database and server details. This is such a small thing, but going back to use the Eclipse version later made me realise how useful it is to have the formatted string populated in advance.

Here is the URL that I used to connect to SQL. jdbc:actuate:sqlserver://localhost:1433;databasename=SUN5 and test the connection

Page | 15

Getting Started with Actuate BIRT

CREATING A DATA SET


Next I created a data set by selecting Data Sets / New Data Set selecting the data source and naming it.

Page | 16

Getting Started with Actuate BIRT

I was presented with the database table structure and faced the same problem as I did in the Eclipse build. Not all of my tables were available to me in the list. I didnt manage to solve this problem yet and although annoying it doesnt prevent you from manually entering SQL statements that work, even if the tables are not visible. You may have noticed that the query builder here and in the Eclipse build is pretty basic. Whilst it is nice to have a full featured SQL query builder it really is not necessary. In the software that I produce I tend to save the cost of writing a dedicated query builder tool in favour of something simpler, exactly like Birt does. The reason for this is that there are excellent SQL query builder tools available in Microsoft SQL server itself and other tools like Toad. So what I tend to do it use those tools to create my SQL, then copy it into here.

In this simple example I queried all the transactions in my financial ledger. This is quite a lot of data and would have made my report run quite slowly so I thought I had better apply a couple of filters, maybe by account code and accounting period, plus this gave me the opportunity to use the filter designer and see how well it worked.

Page | 17

Getting Started with Actuate BIRT

APPLYING FILTERS

So I selected Filter from within the data source designer and was presented with a dialogue where I could select the field I wanted to filter on, presenting me with a list of fields looked up live, direct from my database. I was then able to select the operator, in this case Greater than or Equal to. Next I needed to select the value to filter by and at this point I was thinking, I have no idea what account codes exist in this database, then I clicked on the value field and saw the option to <Select Value>, clicking this made the software perform a live lookup on my database and present me with a list of my account codes. This is excellent as it really goes as far as possible in helping to create filters.

Page | 18

Getting Started with Actuate BIRT

So far everything works just like it does in the Eclipse report designer, with a few extra nice touches that make the job just as easy as it possibly could be. For anyone who has an appreciation for databases and a rough idea of what they want to achieve this process is extremely straight forward.

ADDING DATA TO THE R EPORT

Adding fields to the report works in the familiar Eclipse manner to, I simply dragged the accounting period, account code and description to my report table. At this stage I needed another column on my report for the value column and agreeably the designer is flexible enough to allow a column to be added on the fly.

One of the things I like about this way of doing it, over old Actuate and other report designers is that when you add a new column all the other columns are automatically resized to accommodate it. There is no fiddling around with moving fields and labels around by a pixel here and there to allow space for the new column to be inserted. So I selected the table, right clicked on the header cells and selected insert/column to the right, then dragged my value field into that column.

Page | 19

Getting Started with Actuate BIRT

For insertion of groups, rows and columns, make the table design mode active by clicking anywhere in the table then clicking on the little table tab that appears at the bottom left.

Page | 20

Getting Started with Actuate BIRT

GROUPING DATA

Now that I have my data on my report and filtered down to just my supplier codes, I need to group it by financial period and individual supplier within that.

So I right clicked on the table row header at the left of the detail table row and selected insert Group. I named the group Period and selected from the list of fields that was presented to me usefully this is limited to just the fields appearing on the report.

Page | 21

Getting Started with Actuate BIRT

Obviously it makes sense to put the period value next to my period header so I simply dragged the field to that position Next I followed the same procedure to insert an account group

AUGMENTING A DATA SE T
I previewed my report saw that it needed a bit of tidying up so I moved things around a bit and whilst doing this realised that I needed to add the account description to the report. This is held in another table on my database so I needed to find a way to add another table to an existing data set. So I went to the data set and created a new one called Accounts. Unfortunately I cant simply drag fields from this data set onto my report because I had not yet told Actuate how to link the data sets. So I had to create a third data set called SalesByAccount, which is a Joint Data Set, linking the two previous data sets by account code.

This shows the value in thinking carefully about your data sets before starting your report design, because I still could not drag fields even from my new data set onto the report. I actually had to unbind the table from the sales data set and rebind it to the SalesByAccount data set. This means of course, some of the fields I have inserted onto the report so far are removed!

Page | 22

Getting Started with Actuate BIRT

Unfortunately this didnt solve my problems either, I cant simply drag my fields onto my report as column bindings dont exist. So I decided to scrap my report table and start over based on the new data set.

Page | 23

Getting Started with Actuate BIRT

Thankfully I hadnt done too much work so far and re-creating the report table is very easy to do. I dragged the Table object from the palette and it asked me about the table dimensions and source data set.

Page | 24

Getting Started with Actuate BIRT

SIMPLE FORMATTING

Finally my report is starting to take shape, but I realise that I need to do a bit of formatting to make it look right.

Page | 25

Getting Started with Actuate BIRT

The first thing I do is increase the font size on the Period row and drop in a light blue background. I bolden the font on the customer row and drop in a slightly lighter background. This is all achieved by selecting the row by clicking on the right most cell in table design mode, then using the properties box at the bottom of the screen.

Finally, I use the Quick Tools Aggregate function from centre left of the design area to create a couple of sums in my two group footer areas. Naturally I colour the backgrounds and bolden the fonts. Then Insert a few spacer rows and were done.

Page | 26

Getting Started with Actuate BIRT

Page | 27

Getting Started with Actuate BIRT

FLASH CHARTS

Next I decided to get ambitious and insert a flash chart. Selecting form the objects palette on the left, and placing it in my report, the system automatically asked me if I wanted to download and install Adobe Flash Player. A nice touch.

On dragging my chart to the report layout I found that if I inserted it into the report above the table, it would not appear in the output. If I put it in a cell at the top of the table, then it was squashed up into the limited space available in the cell. So I highlighted the top row of cells used the right click and selected Merge Cells, this gave me a large single cell at the top of the page in which to insert my chart.

Page | 28

Getting Started with Actuate BIRT

Having placed the chart object where I wanted it the chart dialog opened up and I was able to select my chart style

Page | 29

Getting Started with Actuate BIRT

Next came the data selection. I noticed that it is possible to inherit the data from the area of the report where the chart was placed, or select one of my data sets, which means that I could theoretically have a chart based on summary level data and a detailed listing below. Since I want the chart to represent the data in the listing I selected to use data from my joined data set.

In this view it is possible simply to drag field headers from the data preview into the appropriate value or category series.

Page | 30

Getting Started with Actuate BIRT

I want my chart to show sales value on the Y axis and time (months) on the x axis, for 1 year in total. This gave me two distinct problems!

1. My data set was not filtered by year, so in my first attempt at a chart I was seeing all sales for all years, the listing report was 120 pages long and the flash player kept popping up a message saying that the amount of data was causing the flash object to run slowly.

2. The period format in my database was 1999001 to represent January 1999, this clearly did not work because all I got at the bottom of the chart under columns 1 and two and so on was 19990011999002 it looked awful!

To solve the first issue I needed to go back to my data set and filter the data so that only a single years worth of data was sent to the report.

I did this on the sales data set, that made up one leg of my joined data set. Because then I was only feeding a single years worth of transactions into my joined data set, it caused the joined data set only to display a years worth of transactions.

Page | 31

Getting Started with Actuate BIRT

I clicked on New, selected the field I wanted to filter on, selected the operator Between and then selected my value from and to range.

Problem 1 solved, my data was limited and so the chart would only be able to show a years worth of data.

Problem 2 was a little more tricky. The value 1999001 in my source data was an integer and I needed to perform a string operation on it. In other words I needed to chop off the left four characters to give me the year and the right 2 characters to give me the month. So I had to create an expression which first converted the integer to a string and then performed a left and right substring operation.

Page | 32

Getting Started with Actuate BIRT

COMPUTED COLUMNS
For this I turned to the Computed Columns option in the data set and again used the expression builder to create my function. Because this was a slightly more complex function I opened up the expression editor by clicking on the fx button to the right of the expression box.

Here you can see how I have used the JavaScript new String function to convert the integer to a string and then wrapped it in the BirtStr.left function to obtain the 4 left most characters of the string. All the fields and available functions are in the panels below the main expression window so it is easy to find the one you need.

Page | 33

Getting Started with Actuate BIRT

So back to my chart, now I was able to grab the month and year fields and place them in the X series and optional Y series grouping fields to give me my months in numeric format along the bottom of the chart and my year in the legend box.

Page | 34

Getting Started with Actuate BIRT

So far the report looks like this:

Another problem I had was that accounts systems are of course unfathomable to man or beast, this particular one stores my sales values as negative numbers! But I quickly sorted this out by adding another computed column which multiplied the sales value by -1 and presto my sales were (mostly) above the line!

Page | 35

Getting Started with Actuate BIRT

Page | 36

Getting Started with Actuate BIRT

CONCLUSION

Thats it for now. I have created a simple listing report based on a joined data set, added some filtering and data manipulation plus inserted a flash chart object above the listing. Having already used many of these techniques in the open source version it was very easy to accomplish this simple report and those features that I had not previously used were intuitive to understand. So far it is easy to see that the commercial Actuate implementation over the open source Eclipse build adds a few nice touches.

COMING SOON

Next Im going to look at adding interactivity to my reports, so if you have not already, then join the free BIRT Alert mailing list at http://www.BirtReporting.com to ensure that you get the results of this when it becomes available.

Page | 37

Getting Started with Actuate BIRT

FURTHER ASSISTANCE

If you would like to find out more about BIRT reporting then please visit http://www.BIRTReporting.com Please feel free to share this address with your colleagues and inspire them to use BIRT to create great looking reports. Its always great to get feedback so please feel free to send me an email and let me know how you get on with BIRT, provide feedback on this guide, share your tips and tricks, or request help for specific problems. I cant guarantee to personally solve everyones problems but there are some great BIRT related forums out there and you can find a growing list of links and resources on my site. Paul Bappoo Paul@Bappoo.com http://www.BIRTReporting.com

Page | 38

Вам также может понравиться