0% found this document useful (0 votes)
205 views46 pages

Birt Report Designer Reference Guide

Uploaded by

prerna inkar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
205 views46 pages

Birt Report Designer Reference Guide

Uploaded by

prerna inkar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 46

Birt Report Designer Reference Guide

301, Tower 3, Palm


Next To D Mart, New Link Road,
Malad (W), Mumbai – 400064. INDIA
Tel: +91-22-4061 1000
Fax: +91-22-4061 1000
http://www.credenceanalytics.com

Birt Report Designer Reference Guide


@ Bao Viet Fund
Version 1.0

Prepared By : AnilkumarYadav
Reviewed By : Rahul Nair
Date : 18-05-2015

Copyright © 2015 Credence Analytics (I) Pvt. Ltd.

Credence Analytics (I) Pvt. LTD’s prior written consent is required before any part of this
document is reproduced.

Credence Analytics (I) Pvt. Ltd. Page 1 of 46


Birt Report Designer Reference Guide

Version History

Sr.No. Date Version Prepared By Reviewed By Summary of change

1 18/05/2015 1.0 AnilkumarYadav Rahul Nair Base Version

Credence Analytics (I) Pvt. Ltd. Page 2 of 46


Birt Report Designer Reference Guide

Table of Contents
Introduction of Birt Designer Tool 4
Getting Started 5
Creating the Birt Designer file (.rptdesign) 6
Database Connection 10
Dataset Creation 16
Add Standard Report parameters, Styles and Header & Footer 22
Existing Report Parameters 24
Existing Style sheet 27
Standard Header and Footer 30
Report Designing 33
Data Source Binding 36
Data set Binding 40
Report Configuration in .WAR Application 44
Database configuration 44
JAVA Script Coding 46

Credence Analytics (I) Pvt. Ltd. Page 3 of 46


Birt Report Designer Reference Guide

Introduction of Birt Designer Tool

BIRT plugin for JBoss Developer Studio is an Eclipse-based open source reporting system for
web applications based on Java and J2EE. BIRT consists of two main components: a report
designer based on Eclipse, and a runtime component that can be added to your app server.

BIRT also offers a charting engine that lets you add charts to your own Web application.
With the help of BIRT you can generate a great number of reports to be used in your
application:

 Lists
 Charts
 Crosstabs, or cross-tabulation, or matrix
 Letters and Documents
 Compound Reports

In this guide we provide you with the information on BIRT Designer which allows you to create a
report much faster and with far fewer errors so sparing your time.

You can find detailed information on the BIRT report types and anatomy here:
JBoss BIRT http://www.eclipse.org/birt/phoenix/intro/

Credence Analytics (I) Pvt. Ltd. Page 4 of 46


Birt Report Designer Reference Guide

Getting Started

Birt designer is a standalone .exe file and doesn't have any wizard for installation. Copy the folder “5.
birt-rcp-report-designer-4_2_1” in your local machine or to any shared server/ folder.

Double click on “BIRT.exe” available in folder “5. birt-rcp-report-designer-4_2_1” to run the Birt
designer tool.

On Double click, you can see the following screen (Illustration 1) on our desk top.

Illustration 1

Credence Analytics (I) Pvt. Ltd. Page 5 of 46


Birt Report Designer Reference Guide

Creating the Birt Designer file (.rptdesign)

Click on File NewNew Report

Illustration 2

Credence Analytics (I) Pvt. Ltd. Page 6 of 46


Birt Report Designer Reference Guide

Enter the details like File Name and file location to be saved. For e.g. “birt_training.rptdesign” file
location as “C:\Users\credence\Desktop”

Illustration 3

Credence Analytics (I) Pvt. Ltd. Page 7 of 46


Birt Report Designer Reference Guide

After Encoding the details click on “Finish” button.

Illustration 4

Credence Analytics (I) Pvt. Ltd. Page 8 of 46


Birt Report Designer Reference Guide

Tool will open the following screen after click of “Finish” button.

Illustration 5

Credence Analytics (I) Pvt. Ltd. Page 9 of 46


Birt Report Designer Reference Guide

Database Connection
Follow the illustrations to add database connection. Right Click on “Data Source New Data Source” as
shown below;

Illustration 6

Credence Analytics (I) Pvt. Ltd. Page 10 of 46


Birt Report Designer Reference Guide

Select “Create from a data source type in following list” radio button and “JDBC Data Source” from the
list as shown in below illustration.

Illustration 7

Credence Analytics (I) Pvt. Ltd. Page 11 of 46


Birt Report Designer Reference Guide

Enter the data source details.

Illustration 8

Credence Analytics (I) Pvt. Ltd. Page 12 of 46


Birt Report Designer Reference Guide

Provide the details as “Driver Class”, “Database URL”, “User Name” & “Password” as shown in below
illustration.

Illustration 9

Credence Analytics (I) Pvt. Ltd. Page 13 of 46


Birt Report Designer Reference Guide

After encoding the details, to check database connectivity, click on “Test Connection” button.

Illustration 10

Credence Analytics (I) Pvt. Ltd. Page 14 of 46


Birt Report Designer Reference Guide

After successful connectivity, click on “Finish” button to complete add of data source.

Illustration 11

Credence Analytics (I) Pvt. Ltd. Page 15 of 46


Birt Report Designer Reference Guide

Dataset Creation
To add the dataset for report designing, right click on “Dataset” and select “New Data Set” from list of
values as shown in below illustration.

Illustration 12

Credence Analytics (I) Pvt. Ltd. Page 16 of 46


Birt Report Designer Reference Guide

Dataset name can be user defined. The name of dataset can be renamed from default name as “Data
Set” to user defined name. Click on “Next” button to proceed further.

Illustration 13

Credence Analytics (I) Pvt. Ltd. Page 17 of 46


Birt Report Designer Reference Guide

Enter the valid sample report query in the box shown.

Illustration 14

Credence Analytics (I) Pvt. Ltd. Page 18 of 46


Birt Report Designer Reference Guide

Note: Data type of sample query should be same as the real query that will be used for report at run
time after dataset binding. In case of any mismatch in data type of query columns of dummy query and
actual runtime query, iDeal web application (.WAR) will not generate report. It will produce error.

Sample “Select * from transact” query has been used for creation of dataset in following illustration.

After encoding the dataset query, click on “Finish” button.

Illustration 15

Credence Analytics (I) Pvt. Ltd. Page 19 of 46


Birt Report Designer Reference Guide

After click of “Finish” button, tool will open the following screen with few list of option shown at the left
side of the screen as “Query”, “Output Column”, “Preview Results” etc.

Illustration 16

Credence Analytics (I) Pvt. Ltd. Page 20 of 46


Birt Report Designer Reference Guide

On click of “Preview Results” option tool will show the output of the query. Using this option the validity
of valid acceptable query can be tested.

Click on “OK” button to proceed with dataset creation.

Illustration 17

Credence Analytics (I) Pvt. Ltd. Page 21 of 46


Birt Report Designer Reference Guide

Add Standard Report parameters, Styles and Header & Footer


Credence has developed standard parameters and styles along with Standard Header and Footers that
has to be followed in other customized reports to keep it global. These standard parameters, style and
header and footer can be copied from any existing report available in iDeal web application (.WAR
folder).

Click on “FileOpen Files” to open the existing .rptdesign file.

Illustration 18

Credence Analytics (I) Pvt. Ltd. Page 22 of 46


Birt Report Designer Reference Guide

Tool will open the existing .rptdesign file in a new tab.

Illustration 19

Credence Analytics (I) Pvt. Ltd. Page 23 of 46


Birt Report Designer Reference Guide

Existing Report Parameters


Go to the existing .rptdesign tab and click on the “Drop Down” button for “Report Parameter” option
from list of values at the left side of the tool. Select all the parameters and right click for copy option or
press “Ctrl+C” to copy or select “Copy” option from the list of options.

Illustration 20

Credence Analytics (I) Pvt. Ltd. Page 24 of 46


Birt Report Designer Reference Guide

Return to the current .rptdesign tab, select “Report Parameters”, right click for paste option or press
“Ctrl+V” to copy the standard report parameters.

Illustration 21

Credence Analytics (I) Pvt. Ltd. Page 25 of 46


Birt Report Designer Reference Guide

After copying, all the parameter will be available for the current .rptdesign file.

Illustration 22

Credence Analytics (I) Pvt. Ltd. Page 26 of 46


Birt Report Designer Reference Guide

Existing Style sheet


Select the “Drop Down” button for the Styles, and delete the default styles as shown below.

Illustration 23

Credence Analytics (I) Pvt. Ltd. Page 27 of 46


Birt Report Designer Reference Guide

Follow the same steps as mentioned in “Existing Report Parameters” for existing styles. Follow the
following illustration for the same.

Illustration 24

Credence Analytics (I) Pvt. Ltd. Page 28 of 46


Birt Report Designer Reference Guide

Illustration 25

Credence Analytics (I) Pvt. Ltd. Page 29 of 46


Birt Report Designer Reference Guide

Standard Header and Footer


Follow the illustrations to delete the default footers and copy the standard header and footer.

The process of copying the standard header and footer are similar to process mentioned above for
“Reports Parameters” and “Styles”.

Illustration 26

Credence Analytics (I) Pvt. Ltd. Page 30 of 46


Birt Report Designer Reference Guide

Illustration 27

Illustration 28

Credence Analytics (I) Pvt. Ltd. Page 31 of 46


Birt Report Designer Reference Guide

Illustration 29

Illustration 30

Credence Analytics (I) Pvt. Ltd. Page 32 of 46


Birt Report Designer Reference Guide

Report Designing
Birt reports can be designed using multiple controls like “Label”, “Text”, “Dynamic text”, “Data”,
“Image”, “Grid”, “List”, “Table”, “Charts” and “Cross Tab”.

Arithmetic calculation can also be used in order to design the reports. For all supported controls and
functions refer the link mentioned as “Birt Support”.

For designing, many demonstrations and supporting document available online. You can take reference
for designing from online available sources.

Illustration 31

Credence Analytics (I) Pvt. Ltd. Page 33 of 46


Birt Report Designer Reference Guide

Illustration 32

Illustration 33

Credence Analytics (I) Pvt. Ltd. Page 34 of 46


Birt Report Designer Reference Guide

Illustration 34

The above illustrations are just a sample screenshots for designing.

Credence Analytics (I) Pvt. Ltd. Page 35 of 46


Birt Report Designer Reference Guide

Data Source Binding


To bind the data source with iDeal web application (.WAR), right click on “Data Source” and select the
“Edit” option or double click on it as shown in illustration below;

Illustration 35

Credence Analytics (I) Pvt. Ltd. Page 36 of 46


Birt Report Designer Reference Guide

Select “Property Binding” option from list of values shown at left side and click on “fx” button.

JDBC Driver Class, JDBC Driver URL and JNDI URL are the only binding required for iDeal web application
(.WAR).

Illustration 36

Credence Analytics (I) Pvt. Ltd. Page 37 of 46


Birt Report Designer Reference Guide

Follow the illustration for binding of “Data Source”.

Illustration 37

Illustration 38

Credence Analytics (I) Pvt. Ltd. Page 38 of 46


Birt Report Designer Reference Guide

The illustration shown below is the required binding for iDeal web application (.WAR). Click on “Ok”
button to finish the data source binding.

Illustration 39

Credence Analytics (I) Pvt. Ltd. Page 39 of 46


Birt Report Designer Reference Guide

Data set Binding


To bind the data set with iDeal web application (.WAR), right click on “Data Set” and select the “Edit”
option or double click on it as shown in illustration below;

Illustration 40

Credence Analytics (I) Pvt. Ltd. Page 40 of 46


Birt Report Designer Reference Guide

Select “Property Binding” option from list of values shown at left side and click on “fx” button. JDBC
“Query Text” is the only binding required for iDeal web application (.WAR).

Illustration 41

Credence Analytics (I) Pvt. Ltd. Page 41 of 46


Birt Report Designer Reference Guide

Follow the illustrations further to proceed with dataset binding.

Illustration 42

Click on “Ok” button to complete the binding of datset.

Illustration 43

Credence Analytics (I) Pvt. Ltd. Page 42 of 46


Birt Report Designer Reference Guide

Click on “FileSave” or “Ctrl+S” to save the changes made in .rptdesign file.

Illustration 44

After completion of report designing, copy the .rptdesign file at the location configured in
iwz_reports_config table (mentioned in the .WAR folder).

Credence Analytics (I) Pvt. Ltd. Page 43 of 46


Birt Report Designer Reference Guide

Report Configuration in .WAR Application


Database configuration
Manual insert script in table “script_charges_config” need to run in iDeal Fund database for the script
based charges.

viewid ID of view, where to incorporate report OV007


repid Unique report id ROV007
List of Accounts per Nationality
rep_name Report name (FATCA)
paramhtml Not mandatory
Location within .WAR folder to refer the /Reports/Cust_Report/fatca.rptdesi
repxml birt designed file (.rptdesign) gn
Location of Jds file wherein the report
query has been written. The value should
jds be always in between “”. "/CUSTOM/other_reports.jds"
jdc Not mandatory. Can be left blank.
onload Function name used for report query list_accounts_nationality_rep
Sequence the report in case multiple
seq report pertaining to single view 1
updatexml Default value “0” 0
moddataset Not mandatory. Can be left blank.
reporttype Default value “pdf” Pdf
filterfields Not mandatory. Can be left blank.
Name of the user who has created this
created_by report Credence
parameter Not mandatory. Can be left blank.
rep_parameter Not mandatory. Can be left blank.

rep_dateparamet
er Not mandatory. Can be left blank.
job_dataset Not mandatory. Can be left blank.
deleted Default value “N”. N
In case report required multiple dataset.
Applicable values are “Y” &”N”. Default
multi_data_set value “N”. N

Credence Analytics (I) Pvt. Ltd. Page 44 of 46


Birt Report Designer Reference Guide

If “multi_data_set “ is set to “Y”, the detail of multiple dataset need to be defined in table
“iwz_dataset_config”.

repid Report ID ROV007


datasource_name Default value “DATA SOURCE” DATA SOURCE
dataset_id Unique dataset id D010
dataset_name Dataset name. The same data set name 10_COUNTRY_ALLOCATION
should be available in .rptdesign file
dataset_func Dataset function name. getCountryAllocation10
deleted Default value “N” N

Below is the sample insert script for the same.

------------------------------------------------------------------------------------------------------------------------------------------

insert into iwz_reports_config values ('OV007','ROV007','List of Accounts per Nationality


(FATCA)','','/Reports/Cust_Reports/PN/fatca.rptdesign','"/CUSTOM/Other_reports.jds"','','list_accounts_nationality_rep','1','0',''
,'pdf','','credence','','','','','N','N');

INSERT INTO iwz_dataset_config VALUES ('RV27603A','DATA


SOURCE','D011','11_CURRENCY_ALLOCATION','getCurrencyAllocation11','N');

commit

------------------------------------------------------------------------------------------------------------------------------------------

Credence Analytics (I) Pvt. Ltd. Page 45 of 46


Birt Report Designer Reference Guide

JAVA Script Coding


After database configuration, a function with the same name as defined in “onload” in table
“iwz_reports_config”. The code for report query should be written in file
“.war/CUSTOM/other_reports.jds” only. Below is the sample function for reference purpose.

function list_accounts_nationality_rep(vObj,filter) //report


{
var vSQL = new Array();

var vValues = getTabWhereClause(vObj);


vValues = vValues + getFwkWhereClause(filter);
var order_by=getTabSortColumn(vObj);
var fdate = vObj.fdate||'01-01-1000';
var tdate = vObj.tdate||'01-01-1000';

vSQL[vSQL.length] =" select * from ( ";


vSQL[vSQL.length] =" select account_type, account_type_dec, series, client_acccount_id, cif, account_name, permanent_address,
correspond_address, regular_casa, trust_casa, nationality, acct_open_date,b.amount from ( ";
vSQL[vSQL.length] =" "+vSQL1+" ";
vSQL[vSQL.length] =" ) a, ";
// vSQL[vSQL.length] =" ( select client_account_id, amount, conv_amount from (";
vSQL[vSQL.length] =" ( select client_account_id, amount from (";
// vSQL[vSQL.length] =" SELECT customer_code client_account_id,Sum(amount)
amount,Sum(amount*getcurrpairrate_frpti('PHP',currency,To_Date('"+tdate+"','"+iwebz.globalDateFormat+"'))) conv_amount FROM ( ";
vSQL[vSQL.length] =" SELECT customer_code client_account_id,Sum(amount) amount FROM ( ";
vSQL[vSQL.length] =" "+vSQL2+" ";
vSQL[vSQL.length] =" ) GROUP BY customer_code ";
vSQL[vSQL.length] =" union all ";
// vSQL[vSQL.length] =" SELECT CLIENT_ACCOUNT_ID,Sum(PRINCIPLE)
amount,Sum(PRINCIPLE*getcurrpairrate_frpti('PHP',currency,To_Date('"+tdate+"','"+iwebz.globalDateFormat+"'))) conv_amount FROM
( ";
vSQL[vSQL.length] =" SELECT CLIENT_ACCOUNT_ID,Sum(PRINCIPLE) amount FROM ( ";
vSQL[vSQL.length] =" "+vSQL3+" ";
vSQL[vSQL.length] =" ) GROUP BY CLIENT_ACCOUNT_ID ";
vSQL[vSQL.length] =" )) b ";
vSQL[vSQL.length] =" where a.client_acccount_id=b.client_account_id(+) ";
vSQL[vSQL.length] =" )a WHERE 1=1 "+vValues+order_by;
vSQL= vSQL.join("\n ");

// appendFileText(serverPath+"/mailing_address_Query.txt","\n report list_accounts_nationality_rep "+vSQL)


return vSQL;
}

Credence Analytics (I) Pvt. Ltd. Page 46 of 46

You might also like