SpagoBI Lesson 4: BIRT Reports

BIRT

BIRT is the acronym for Business Intelligence and Reporting Tools and is an open source initiative to create a fully functional reporting tool using open source tools. BIRT supports various types of reports such as lists, charts, crosstabs and compound reports. In this chapter we will learn how to create BIRT reports and how to publish them in SpagoBI server.

Note: In case you are reading this at spagolabs blog, then you can get the mysql dump and other files needed for this tutorial by writing the author at the email xogutu at gmail dot com for a small fee.

We will be creating a report similar to the one above.

Let us create a new report.

1. Start the Spago BI studio.

2. Create a new project.

a. Click on File -> New -> Project.

b. Under Business Intelligence and Reporting Tools select Report Project.

c. Click Next.

d. Under project name use “Business Intelligence”. For the storage location, use default.

e. Your new project will now be visible on the navigator on the bottom left of the page.

3. Define a new report. Click on New -> Report.

a. For the report name, use “Administrative Costs”

b. For the report template, select blank report and click on finish.

c. Your new report should be visible on the navigator.

4.

Reports can get their data from various sources such as flat files or relational databases.

We need to create a connection to the database from the SpagoBI Studio. Proceed as shown below.

a. Click on Data -> New Data source.

b. Select JDBC Data Source, and on Data Source Name put “Mysql Local”

c. For the Data source details, enter the following.

Change the URL, username and password appropriately. Click on Test Connection. This should be successful before you proceed.

Click on Finish.

d. When you click on Data Explorer, your new connection should be visible.

e. With the Data Explorer still opened, right click on Data Sets, and select New Data Set.

f. For the data source location select Mysql Local (The data source you just created above).

g. For data set name, put AdminCost.

h. For the query text, use “select * from admincost”. This will select all the contents of the table admincost.

i. Click on finish.

j. On your dataset, click on preview results, this will output the contents of the table admincost.

k. Click on Pallete and under report items, select grid. The grid allows you to organize the items in your reports like images, charts, text etc.

l. Create a grid with 2 columns and one row.

m. Drag an image icon to the first cell.

n. Click on embedded image then select the shemma.jpg image from the BIRT folder on the CD that came with this book.

o. Drag the image to make it smaller.

p. Drag the text item to the second cell.

q. For the type of text, select HTML. Write a header as shown.

r. Once you are done, your report should look like the one shown below.

s. Next we will include the actual data on the report.

5. To include data from the data set we create above on the report, click on the Data Explorer tab. Expand datasets and drag AdminCost on an empty area of your report.

6. Using the property editor, change the heading for id, item and cost.

a. Before

b. After.

c. To test the report we just created, click on

d. And there you have it, your very first BIRT report!

7. Next we need to publish our report to the SpagoBI server. Proceed as follows.

a. In the data explorer, right click on Report Parameters then click on New Parameter. For the name enter driver.

b. Create other parameters url, user and pwd.

c. Right click on the data source “Mysql Local”, click on edit and select Property Binding. Attach the parameters as shown below.

This can be easily be done as follows:

i. Click on the fx (Javascript sysntax) button next to JDBC Driver Class.

ii. Under category select Reports Parameters.

iii. Under Sub Category select All.

d. Under Double Click to Insert, double click on driver.

e. Repeat the procedure for JDBC Driver URL, User Name and Password.

f. If you have not been Saving your work, this is a good time to do so!

g. Right Click on your Business Intelligence project and click on properties. Unser Resource, check the location where your report is stored.

h. Take note of this location as we will use it when creating documents in Spago BI.

8. Start your SpagoBI server and navigate to http://localhost:8080/SpagoBI.

9. Login with username bidev and password bidev.

10. Click on Analytical model -> Documents Development.

11. Click on Insert.

12. Under Show document templates, select the folder you want your document to be stored.

13. Click on browse and navigate to where your AdministrativeCosts.rptdesign report file is stored.

14. Click on Save.

15. Click on Administrative Tasks under the folder you saved your report. You should have the report displayed on the SpagoBI server.

SpagoBI 教程 Lesson 4: BIRT Reports的更多相关文章

  1. SpagoBI 教程 Lesson 1:Introduction and Installation

    SapgoBI Lesson 1: Introduction and Installation Downloading and installing SpagoBI. Download SpagoBI ...

  2. SpagoBI 教程 Lesson 5: Creating a dashboard with BIRT and SpagoBI

    SpagoBI Lesson 5: Creating a dashboard with BIRT and SpagoBI Creating a dashboard with BIRT and Spag ...

  3. SpagoBI 教程 Lesson 3: Highchart Dashboards

    SpagoBI Lesson 3: Highchart Dashboards Business Intelligence dashboards Every car comes with a dash ...

  4. SpagoBI 教程 Lesson 2: OLAP with JPIVOT

    SpagoBI Lesson 2: OLAP with JPIVOT Online Analytical Processing Online Analytical Processing (OLAP) ...

  5. 教程:SpagoBI开源商业智能之XML Template 图表模板

    SpagoBI offers a variety of widgets' examples realized with the Highcharts library, that can be divi ...

  6. 教程:Spagobi开源BI系统 Console报表设计教程

    Console Designer 1 Console Designer Console Designer 1.1 Introduction 1.2 Dataset Tab 1.3 Summary Pa ...

  7. Lazy的SDL教程 翻译----Lesson 22 Timing

    原文:http://lazyfoo.net/tutorials/SDL/22_timing/index.php Timing 计时 Last Updated 3/10/14 Another impor ...

  8. java1234教程系列笔记 S1 Java SE chapter 02 lesson 03 java基本数据类型

    第二章 第三节 数据类型 3.1 分类 基本数据类型.引用类型 3.2整型 byte 8 short 16 int  32 long 64 作业: A:1-10求和 B:float double 的最 ...

  9. LoadRuner12.53教程(一)

    LoadRunner教程 L   o   a   d   R   u   n   n   e   r   jiào教   chéng程 Welcome to the LoadRunner tutori ...

随机推荐

  1. Android性能优化系列之apk瘦身

    Android性能优化系列之布局优化 Android性能优化系列之内存优化 为什么APK要瘦身.APK越大,在下载安装过程中.他们耗费的流量会越多,安装等待时间也会越长:对于产品本身,意味着下载转化率 ...

  2. centos安装man中文手册

    第一步下载man中文手册压缩包 //下载 wget http://pkgs.fedoraproject.org/repo/pkgs/man-pages-zh-CN/manpages-zh-1.5.1. ...

  3. (原创)C++11改进我们的程序之move和完美转发

    本次要讲的是右值引用相关的几个函数:std::move, std::forward和成员的emplace_back,通过这些函数我们可以避免不必要的拷贝,提高程序性能.move是将对象的状态或者所有权 ...

  4. 【数据库】悲观锁与乐观锁与MySQL的MVCC实现简述

    悲观锁 悲观锁,就是一种悲观心态的锁,每次访问数据时都会锁定数据: 乐观锁 乐观锁,就是一种乐观心态的锁,每次访问数据时并不锁定数据,期待数据并没作修改,如果数据没被修改则作具体的业务 应用程序上使用 ...

  5. [MyBean说明书]-添加IApplicationContextEx01接口手动加载库文件

    主控台接口实现了IApplicationContextEx01接口,可以手动执行加载DLL和配置文件,具体使用方法可以参见DEMO(samples\manualLoadLib)   IApplicat ...

  6. hive外部表删除遇到的一个坑

    hive外部表删除遇到的一个坑 操作步骤 创建某个表(create external table xxx location xxx) 插入数据(insert xxx select xxx from x ...

  7. python中如何使用requests模块下载文件并获取进度提示?

    Reference: https://www.zhihu.com/question/41132103 #!/usr/bin/env python3 import requests from conte ...

  8. 线程安全的无锁RingBuffer的实现【一个读线程,一个写线程】

    在程序设计中,我们有时会遇到这样的情况,一个线程将数据写到一个buffer中,另外一个线程从中读数据.所以这里就有多线程竞争的问题.通常的解决办法是对竞争资源加锁.但是,一般加锁的损耗较高.其实,对于 ...

  9. Asp.net 从客户端中检测到有潜在危险的Request.Form值

    解决方法: 在Web.config文件里找到<httpRuntime>节点,然后修改requestValidationMode="2.0" 修改结果如下: <sy ...

  10. Eclipse C++的配置问题launch failed binary not found

    首先下载eclipse c++ 我的是64bit版本 安装好MinGW,并配置好环境变量,参考我的博客 http://www.cnblogs.com/fickleness/p/3273044.html ...