From jbosstools-commits at lists.jboss.org Thu Mar 4 05:56:34 2010
Content-Type: multipart/mixed; boundary="===============7751007362443340061=="
MIME-Version: 1.0
From: jbosstools-commits at lists.jboss.org
To: jbosstools-commits at lists.jboss.org
Subject: [jbosstools-commits] JBoss Tools SVN: r20639 -
branches/jbosstools-3.1.x/birt/docs/en.
Date: Thu, 04 Mar 2010 05:56:34 -0500
Message-ID: <201003041056.o24AuYpS020202@svn01.web.mwc.hst.phx2.redhat.com>
--===============7751007362443340061==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ochikvina
Date: 2010-03-04 05:56:34 -0500 (Thu, 04 Mar 2010)
New Revision: 20639
Modified:
branches/jbosstools-3.1.x/birt/docs/en/master.xml
branches/jbosstools-3.1.x/birt/docs/en/master_output.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-1107 -Updated docs source files =
here with the ones for JBDS 3.0.0 GA release.
Modified: branches/jbosstools-3.1.x/birt/docs/en/master.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/jbosstools-3.1.x/birt/docs/en/master.xml 2010-03-04 10:31:39 U=
TC (rev 20638)
+++ branches/jbosstools-3.1.x/birt/docs/en/master.xml 2010-03-04 10:56:34 U=
TC (rev 20639)
@@ -53,14 +53,14 @@
=
2008
- 2009
+ 20092010JBoss by Red Hat
=
=
- Version: 1.1.0.CR1
+ Version: 1.1.0.GA
=
=
@@ -81,4 +81,4 @@
&links;
=
=
- =
+ =
Modified: branches/jbosstools-3.1.x/birt/docs/en/master_output.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/jbosstools-3.1.x/birt/docs/en/master_output.xml 2010-03-04 10:=
31:39 UTC (rev 20638)
+++ branches/jbosstools-3.1.x/birt/docs/en/master_output.xml 2010-03-04 10:=
56:34 UTC (rev 20639)
@@ -1,6 +1,6 @@
-
@@ -9,162 +9,170 @@
=
=
=
-
-
-
-]>
+ =
+]>
- JBoss BIRT Integr=
ation User Guide
+ JBoss BIRT Integration User Guide
=
-
-
-
+
+
+ =
-
-
+
+ =
=
=
- Michael=
Sorokinmsorokin(a)exadel.com =
- AnastasiyaBogachukabogachuk(a)exadel.com =
- OlgaChikvina =
+ MichaelSorokinmsorokin(a)exadel.com<=
/author> =
+ AnastasiyaBogachukabogachuk(a)exadel.com =
+ OlgaChikvina =
=
- =
+ =
=
-
+
Special thanks to Snjezana Peco
-
+
=
=
=
=
=
+
+
+
+
+ =
+ =
+ =
+ =
+ =
=
-
- 2008
- 2009
- JBoss by Red Hat
+
+ 2008
+ 2009
+ 2010
+ JBoss by Red Hat
=
=
-
- Version: 1.1.0.CR1
+
+ Version: 1.1.0.GA
=
=
-
-
-
+
+
+ PDF version=
ulink>
=
=
- =
+ =
=
=
-
+
=
-
- JBoss Developer Studio
- Eclipse
- JBoss
- JBoss Tools
- JBDS
- BIRT Plugin
+
+ JBoss Developer Studio
+ Eclipse
+ JBoss
+ JBoss Tools
+ JBDS
+ BIRT Plugin
=
- Introduction
+ Introduction
=
=
=
=
-
+
=
- What is BIRT?
- BIRT plugin is an Eclipse-based open source reporting system=
for web applications
+ What is BIRT?
+ BIRT plugin is an Eclipse-based open source report=
ing 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 app=
lication.
- With the help of BIRT you can generate a great number of rep=
orts to be used in your
+ With the help of BIRT you can generate a great num=
ber of reports to be used in your
application:
=
-
-
- Lists
+
+
+ Lists
-
- Charts
+
+ Charts
-
- Crosstabs, or cross-tabulation, or matrix
+
+ Crosstabs, or cross-tabulation, or matrix=
-
- Letters and Documents
+
+ Letters and Documents
-
- Compound Reports
+
+ Compound Reports
=
- You can find more detailed information on the BIRT plugin, i=
ts report types and
+ You can find more detailed information on the BIRT=
plugin, its report types and
anatomy on the BIRT Homepage.
=
- To understand the basic BIRT concepts and to know how to cre=
ate a basic BIRT report,
+ To understand the basic BIRT concepts and to know =
how to create a basic BIRT report,
refer to the Eclipse BIRT
- Tutorials. What extensions JBoss Tools provides for
+ Tutorials. What extensions JBo=
ss Tools provides for
Eclipse BIRT you'll find out in the next sections.
=
=
=
-
- JBoss BIRT Integration Functionality Overview
+
+ JBoss BIRT Integration Functionality Overview
=
-
+
The key feature of JBoss BIRT Integration is the JBoss BIRT I=
ntegration Framework, which allows to integrate a BIRT report into Seam/JSF=
container.
The framework API reference is in the =
- JBoss BIRT Integraion Framew=
ork API Reference chapter of the guide.
- =
-
+ JBoss BIRT Integraion Fr=
amework API Reference chapter of the guide.
+ =
+
=
- This guide also covers functionality of JBoss Tools module which assists in =
+ This guide also covers functionality of J=
Boss Tools module which assists in =
integration with BIRT.
- The integration plug-in allows you to visually configure Hibernate Data Source (specify a Hibernate configurat=
ion or JNDI URL), =
+ The integration plug-in allows you to visually configure Hibernate Data Source (specify a Hibernate config=
uration or JNDI URL), =
compose HQL queries with syntax-highlighting, content-assist, =
formatting as well as other functionalities available in the HQL editor. =
=
=
-
+
=
-
- To enable JBoss T=
ools integration with =
BIRT you are intended to
+
+ To enable JBoss Tools integrati=
on with BIRT you are intended to
have the next:
-
-
-
- Eclipse with JBoss Tools=
- installed (how to install =
JBoss Tools on Eclipse, what
- dependences and versions requirements are needed reed =
in the JBoss Tools Installation sect=
ion)
+
+
+
+ Eclipse with JBoss To=
ols
+ installed (how to install JBoss To=
ols on Eclipse, what
+ dependences and versions requirements are needed reed =
in the JBoss Tools Installation s=
ection)
-
- BIRT Report Designer (BIRT Report Designer 2.3.2 =
+
+ BIRT Report Designer (BIRT Report Designe=
r 2.3.2 =
you can download from Eclipse downloads site)
-
- BIRT Web Tools Integration ( BIRT WTP Integration 2.=
3.2 you can download from
+
+ BIRT Web Tools Integration ( BIRT WTP Int=
egration 2.3.2 you can download from
Eclipse downloads site)
=
-
- Note:
- Versions of BIRT framework and BIRT WTP integration shou=
ld be no less than RC4 in
+
+ Note:
+ Versions of BIRT framework and BIRT WTP integr=
ation should be no less than RC4 in
order to the BIRT facet works correctly.
@@ -175,101 +183,105 @@
=
=
=
-
+
-
+
=
- Eclipse
- JBoss
- JBoss Tools=
- BIRT=
Integration
+ Eclipse
+ JBoss
+ JBoss Tools
+ BIRT Integration
=
- Tasks
- =
In this chapter of the guide you will find information on the tasks that y=
ou can perform integrating BIRT. The required version of BIRT is 2.3.2 or g=
reater.
+ Tasks
+ In this chapter of the guide you will find informatio=
n on the tasks that you can perform integrating BIRT. The required version =
of BIRT is 2.3.2 or greater.
=
=
=
=
=
-
- Adding BIRT Functionality to Standard Seam Web Project
+
+ Adding BIRT Functionality to Standard Seam Web Projec=
t
=
- In this section you'll=
know how to integrate BIRT into a Seam web project.
+ In this section you'll know how to integrate BIRT into=
a Seam web project.
=
- You are supposed to have=
Seam runtime and JBoss Application Server downloaded and
+ You are supposed to have Seam runtime and JBoss Applic=
ation Server downloaded and
extracted on your hard drive. =
You can download Seam from the
- Seam Framew=
ork web pa=
ge and =
- JBoss Application Server from JBoss Application Server official site.
+ Seam Framework web page and =
+ JBoss Application Server from JBoss Application Server official site.
=
-
+
=
Tip:
- We used JBoss Seam 2.0.1 GA and JBoss Application Server 4.2.2 GA in examples of t=
his guide.
+ We used JBoss Seam 2.0.1 GA and JBoss Application Server 4.2.2 GA in examples of =
this guide.
=
-
- Creating Seam Web Project with Birt Facet
+
+ Creating Seam Web Project with Birt Facet
=
- We recommend to op=
en Seam perspective=
by going to
- Window > Open Perspective > =
Other > Seam , this way you will have all the tools to work with Seam at hand.
- To create a new Seam Web project navigate to
- File > New > Seam Web Pr=
oject
- . Otherw=
ise you should go to =
+ We recommend to open Seam pers=
pective by going to
+ Window > Open Perspective > Other &=
gt; Seam , this way you will have all the tools to wo=
rk with Seam at hand.
+ To create a new Seam Web project navigate to
+ File > New > Seam Web Project
+ . Otherwise you should go to =
=
- File > New > Other > =
Seam > Seam Web
+ File > New > Other > Seam >=
; Seam Web
Project
- if Seam perspective is not active.
+ if Seam perspectiv=
e is not active.
=
- =
+ =
=
-
- On the first wizard page enter the project name, then specify the t=
arget runtime and
+
+ On the first wizard page enter the project nam=
e, then specify the target runtime and
target server. We recommend to use JBoss AS server and runtime=
environment to ensure best performance.
-
+
=
=
-
- Creating Seam Web Project
-
-
-
+
+ Creating Seam Web Project
+
+
+
-
- In the Configuration gr=
oup choose the version of
- Seam
- framework you =
are planning to use in your application. In this guide we used Seam 2.2. =
diffmk:wrapper>
+
+ In the Con=
figuration group choose the version of
+ Seam
+ framework you are planning to use in your application.=
In this guide we used Seam 2.2.
-
- Click the Modify button
- and enable the
- Birt Reporting Runtime Compone=
nt
- facet by=
checking the appropriate option.
+
+ Click the Modify button
+ and enable the
+ Birt Reporting Runtime Component
+ facet by checking the appropriate option.
=
-
- Adding the Birt Reporting Runtime Component Facet
-
-
-
+
+ Adding the Birt Reporting Runtime Component F=
acet
+
+
+
- Alternativ=
ely you can just choose the
- JBoss BIRT Integration Web=
Project
- config=
uration from the drop-down list in the Configuration=
emphasis> group =
+ Alternatively you can just choose the
+ JBoss BIRT Integration Web Project=
+ configuration from the drop-down list in the <=
emphasis xmlns=3D"http://docbook.org/ns/docbook" xmlns:xlink=3D"http://www.=
w3.org/1999/xlink">Configuration =
group
=
-
- Choosing the JBoss BIRT Integration Web Project=
Configuration
-
-
-
+
+ Choosing the JBoss BIRT Integration W=
eb Project Configuration
+
+
+
@@ -277,21 +289,21 @@
=
=
- =
- You may leave the=
next two pages with default values, just press =
Next to proceed.
-
+ =
+ You may leave the next two pages with default val=
ues, just press Next to proceed.
+ =
=
-
+
=
- On the B=
irt Configuration page you can modify the BIRT deployment settings, which you can edit=
afterwards in the web.xml of the generated project. Let's keep the defaul=
t values for now.
-
+ On the Birt Configuration page you can modify the BIRT=
deployment settings, which you can edit afterwards in the web.xml of the =
generated project. Let's keep the default values for now.
+
=
-
- Configuring BIRT Deployment Settings
-
-
-
+
+ Configuring BIRT Deployment Settings<=
/title>
+
+
+
@@ -300,23 +312,23 @@
=
=
- =
- You can also l=
eave the JSF Capabilities p=
age with default values. =
+ =
+ You can also leave the JSF Capabilities page with default v=
alues. =
=
-
- On the
- Seam Facet
- page you=
should specify the Seam runtime and Connection profile. Please note, that =
the Seam runtime must be of the version you initially specified in the proj=
ect settings (See the Creati=
ng Seam Web Project figure).
- When creating a Seam project with BIRT capabilities you can use=
the <=
diffmk:wrapper diffmk:change=3D"added">BIRT Classic Models Sample Database<=
/diffmk:wrapper> connect=
ion profile to work with the BIRT sample database.
+
+ On the
+ Seam Facet
+ page you should specify the Seam runtime and Con=
nection profile. Please note, that the Seam runtime must be of the version =
you initially specified in the project settings (See the Creating Seam Web Project figure).=
+ When creating a Seam project with BIRT capa=
bilities you can use the BIRT Classic Models Sample Dat=
abase connection profile to work with the BIRT sample database.=
=
- For more details on how to configure database connection for a S=
eam project please read the =
- Configure Seam Facet Settings chapter of S=
eam Dev Tools Reference Guide.
-
- Configuring the Seam Facet settings
-
-
-
+ For more details on how to configure databas=
e connection for a Seam project please read the =
+ Configure Seam Facet Settings =
chapter of Seam Dev Tools Reference Guide.
+
+ Configuring the Seam Facet settings
+
+
+
@@ -324,75 +336,75 @@
=
=
- =
- Hit
- Finish
- to create th=
e project with BIRT functionality enabled.
+ =
+ Hit
+ Finish
+ to create the project with BIRT functionality enabled.=
=
-
- Integration with Seam
-
+
+ Integration with Seam
+
In the previous section you have created a Seam project with BIRT capa=
bilities. =
Now you can create a simple kick start project to see that everything =
is configured correctly. =
-
+
=
=
-
- Now create a BIRT report file and insert test data into =
the file.
- Name the report file helloBirt.rptdesign, the repor=
t should print the data from the CLASSICMODELS.CUSTOMERS table of the BIRT Classic Models Sample Database, namely: customer number (=
CLASSICMODELS.CUSTOMERS.CUSTOMERNAME), =
- contact person first name ( CLASSICMODELS.CUS=
TOMERS.CONTACTFIRSTNAME) ,
- contact person last name (CLASSICMODELS.CUSTOM=
ERS.CONTACTLASTNAME) and =
- contact person phone number(CLASSICMODELS.CUST=
OMERS.PHONE=
). =
-
- The title of th=
e report should be set via <=
diffmk:wrapper diffmk:change=3D"added">reportTitle<=
diffmk:wrapper diffmk:change=3D"added"> parameter =
-
- As this guide is primarily focused on the BIRT integra=
tion and not the BIRT technology itself we will not show the steps required=
to make the report. If you do not feel strong about creating a BIRT report=
file please read BIRT documentation.
- =
- You can down=
load the file helloBirt.rptdesign =
here and copy it to the WebContent folder of your Seam =
project. =
+
+ Now create a BIRT report =
file and insert test data into the file.
+ Name the report file helloBirt.rptdesi=
gn, the report should print the data from the CL=
ASSICMODELS.CUSTOMERS table of the BIRT Classic =
Models Sample Database, namely: customer number (CLASSICMODELS.CUSTOMERS.CUSTOMERNAME), =
+ contact person first name ( CLASSICMODELS=
.CUSTOMERS.CONTACTFIRSTNAME) ,
+ contact person last name (CLASSICMODELS.CU=
STOMERS.CONTACTLASTNAME) and =
+ contact person phone number(CLASSICMODELS.=
CUSTOMERS.PHONE). =
+
+ The title of the report should be set via reportTitle parameter =
+
+ As this guide is primarily focused on the BIRT integra=
tion and not the BIRT technology itself we will not show the steps required=
to make the report. If you do not feel strong about creating a BIRT report=
file please read =
BIRT documentation.
+ =
+ You can download the file helloBirt.rptdesignhere and copy it to the WebContent folder of your Seam project.<=
/para> =
=
=
-
-
- When you are done with the helloBirt.rptdesign file, you =
should create a .xhtml file that will contain the BIRT report you have=
just created.
- =
+
+
+ When you are done with the helloBirt.rptde=
sign file, you should create a .xhtml file that will contain the BIRT report you have just created.
+ =
=
=
- =
- The JBoss BIRT Integration framework provides 2 components repre=
sented as =
<=
b:birt> and <b:param> tags. The jboss-seam-birt.jar library implements =
the functionality of the components. To find more information about the fra=
mework pleas read the JBoss BIRT Integra=
ion Framework API Reference chapter.
+ =
+ The JBoss BIRT Integration framework provides 2 components repre=
sented as <b:birt=
> and <b:param> tags. The jboss-seam-birt.=
jar library implements the functionality of the components. To find more in=
formation about the framework pleas read the JBoss BIRT Integraion Framework API Reference chapter.
To use that tags on the page you need to declare the tag lib=
rary and define the name space like this: =
-
+
=
=
- =
+ ]]> =
=
-
- The <b:birt> is a container for a BIRT report=
, that helps you integrate the report into Seam environment. =
- You can manage the properties of the report using the attributes=
of the <=
property moreinfo=3D"none"><b:=
birt> tag.
-
+
+ The <b=
:birt> is a container for a BIRT report, that help=
s you integrate the report into Seam environment. =
+ You can manage the properties of the report using the attributes=
of the <b:birt&g=
t; tag.
+
=
-
+
=
- The <b:param> tag describes report parameters. To set a parameter=
you need to specify it's name the value you want to pass. =
+ The <=
;b:param> tag describes report parameters. To set=
a parameter you need to specify it's name the value you want to pass. =
You can use EL expressions to bind the representation layer wi=
th back-end logic.
-
+
=
-
+
=
=
=
=
-
+
=
=
- Create the =
helloBirt.xhtml file in the WebContent with the following content: <=
/diffmk:wrapper>
+ Create the helloBirt.=
xhtml file in the WebContent with the following content:
=
- =
-...]]> =
+...]]> =
=
- From this=
listing above you see that the title of the report is set via <b:param> by setting the parameter name and defining the "value" attribute with the "Customers Contacts" value.=
diffmk:wrapper>
-
- We have created a Se=
am project and inserted the <=
diffmk:wrapper diffmk:change=3D"changed">helloBirt report into the hel=
loBirt.xhtml view file.
-
-
-To see that the application =
works correctly and as you expect, you need to launch it on the server.
+ From this listing above you see that the =
title of the report is set via <b:param> by setting the parameter n=
ame and defining the "value" attribute with the "Customers Contacts" value.
+ =
+
+ =
+ =
+ =
+ =
+
+ We have created a Seam project and inserted the <=
property xmlns=3D"http://docbook.org/ns/docbook" xmlns:xlink=3D"http://www.=
w3.org/1999/xlink">helloBirt report into the helloBirt.xhtml view file. =
+ =
+ =
+To see that the application works correctly and as you exp=
ect, you need to launch it on the server.
- In the JBoss Server View (If it is not open navigate to Windows > Sh=
ow View > Other > JBoss Server View ), select the server the application is =
deployed to and hit the Start button.
-
- When the server is s=
tarted, open your favourite browser and point it to http://loca=
lhost:8080/HelloBirt/helloBirt.seam .
-
-
-
- Integrating BIRT into=
Seam Project
-
-
-
+ In the JBoss S=
erver View (If it is not open navigate to W=
indows > Show View > Other > JBoss Server View ), selec=
t the server the application is deployed to and hit the Start button.
+
+ When the server is started, open your favourite br=
owser and point it to http://localhost:8080/HelloBirt/hello=
Birt.seam .
+ =
+ =
+
+ Integrating BIRT into Seam Project
+
+
+
-
+ =
-
-
-
+
+ =
+
+
+ =
+
=
=
- Using Hibernate ODA Data Source
+ Using Hibernate ODA Data Source
=
- The JBoss BIRT Integration feature includes the Hibernate ODA Da=
ta Source which is completely
+ The JBoss BIRT Integration feature includes the Hibern=
ate ODA Data Source which is completely
integrated with Hibernate Tools. You can use it the way as you wou=
ld use any of BIRT ODA drivers.
=
=
-
-
- First, you need to reverse engineer from the database to generat=
e Seam entities. You can perform this operation going to
- File > New > Seam Generate Entities
- in the Seam perspective. More det=
ails on the Seam Generate
- Entities please read Seam Dev Tools Reference guide).
- In this guide we will use the Employees table=
of the DATAMODELS database.
+
+
+ First, you need to reverse engineer from the database =
to generate Seam entities. You can perform this operation going to
+ File > New > Seam Generate Entities=
+ in the Seam perspective=
. More details on the Seam Generate
+ Entities please read Seam D=
ev Tools Reference guide). =
+ In this guide we will use the Employees table of the DATAMODELS database. =
=
-
- Tip:
- Before performing Seam Generate Entities, you should have a =
connection profile
- adjusted and connected to a database. How to do this see in th=
e CRUD Database Application chapter of the Seam Dev=
Tools Reference
+
+ Tip:
+ Before performing Seam Generate Entities, you shou=
ld have a connection profile
+ adjusted and connected to a database. How to do this see in th=
e CRUD Database Application chapter of=
the Seam Dev Tools Reference
guide.
-
+
If you followed the steps described in the
- Adding BIRT Funct=
ionality to Standard Seam Web Project chapter,
- you would have a connection profile already configured.
+ Adding =
BIRT Functionality to Standard Seam Web Project chapter,
+ you would have a connection profile already configured. =
-
-
- Next you should create a new BIRT report file ( >F=
ile > New > Other > Business Intelligence and Reporting
- Tools > Report) to represent the data fro=
m the Employees table. Call the file employe=
es.rptdesign.
+
+
+ Next you should create a new BIRT report file ( &g=
t;File > New > Other > Business Intelligence a=
nd Reporting
+ Tools > Report) to represent the data fro=
m the Employees table. Call the file employees.rptdesign.
=
-
-
-
- Now switch to the BIRT Report Design perspe=
ctive.
+
+ =
+ =
+ Now switch to the BIRT Report Desi=
gn perspective.
-
- In the Data Explorer view right-click the <=
emphasis>
- Data Source
- node and choose
- New Data Source.
+
+ In the Data Explorer vi=
ew right-click the
+ Data Source
+ node and choose
+ New Data Source.
=
-
- Creating a New Data Source
-
-
-
+
+ Creating a New Data Source
+
+
+
-
- The wizard will prompt you to select data source type. Choose <=
emphasis>
- Hibernate Data Source
- and give it a meaningful name, for instance
- HibernateDataSource
- . Hit
- Next to proceed.
+
+ The wizard will prompt you to select data source type.=
Choose
+ Hibernate Data Source
+ and give it a meaningful name, for instance
+ HibernateDataSource
+ . Hit
+ Next to proceed.
=
-
- Creating Hibernate Data Source
-
-
-
+
+ Creating Hibernate Data Source
+
+
+
-
- On the next wizard's dialog you can leave the everything with de=
fault values, press the
- Test Connection
+
+ On the next wizard's dialog you can leave the everythi=
ng with default values, press the
+ Test Connection button to verify that the connection is established succe=
ssfully.
-
-
- The Hibernate Data Source enables you to spec=
ify a Hibernate Configuration or JNDI URL.
-
+ =
+
+ The Hibernate Data Source enables =
you to specify a Hibernate Configuration or JNDI URL. =
+ =
=
-
- Hibernate Data Source Profile
-
-
-
+
+ Hibernate Data Source Profile
+
+
+
-
- Press
- Finish
- to complete New Data Source wizar=
d.
+
+ Press
+ Finish
+ to complete New Data Source wizard.
+ =
+
+ Now you need to configure a new Hibernate ODA data set=
. Launch the
+ New Data Set wizard. In the Data Explorer View
+ right-click the
+ Data Set
+ node and select
+ New Data Set.
=
-
- Now you need to configure a new Hibernate ODA data set. Launch t=
he
- New Data Set wizard. In the Data Ex=
plorer View
- right-click the
- Data Set
- node and select
- New Data Set.
-
-
- Select HibernateDataSource as target data s=
ource and type in the new data set name.
- Call it HibernateDataSet.
+
+ Select HibernateDataSource as target data source and type in the new data set name.
+ Call it HibernateDataSet.
=
=
=
=
-
- Creating a Hibernate ODA Data Set
-
-
-
+
+ Creating a Hibernate ODA Data Set
+
+
+
-
+
=
- The next dialog of the wizard will help you compose a query for =
the new data set.
- We will make a report that will print all employees in the datab=
ase who has Sales Rep job title.
+ The next dialog of the wizard will help you compose a =
query for the new data set.
+ We will make a report that will print all employees in=
the database who has Sales Rep job title.
=
-
-
-
-
-
-
+...]]> =
+ =
+ =
+ =
+ =
+ =
To validate the
- entered query you can press the
- Test query
+ entered query you can press the
+ Test query button. All the HQL features like syntax highlighting,=
content assist,
formatting, drag-and-drop, etc., are available to facilitate query=
composing.
=
-
- Composing query for Data Set
-
-
-
+
+ Composing query for Data Set
+
+
+
-
-
- Pressing Finish will call the Edi=
t Data Set dialog where you can adjust the parameters of the da=
ta set and preview the resulted set.
- If everything looks good, hit Ok to generate =
a new data set.
+
+ =
+ Pressing Finish will ca=
ll the Edit Data Set dialog where you can a=
djust the parameters of the data set and preview the resulted set.
+ If everything looks good, hit Ok to=
generate a new data set.
-
+
+ =
+ Now you can insert the data set items of HibernateDataSet into the employees.=
rptdesign.
+ =
=
- Now you can insert the data set items of HibernateDat=
aSet into the employees.rptdesign.
-
-
-
- Tip:
- If you don't know how to do this we suggest that you re=
fer to the Ecli=
pse BIRT Tutorial.
+
+ Tip:
+ If you don't know how to do this we suggest that y=
ou refer to the Eclipse BIRT Tutorial.
+ =
=
-
-You can also use parameters in the query to add dynamics to your re=
port. In the previous example we hardcoded the selection criterion in the <=
code>where clause.
- To specify the job title on-the-fly your query should look like =
this:
- You can also use parameters in the query to add dynamics =
to your report. In the previous example we hardcoded the selection criterio=
n in the where clause.
+ To specify the job title on-the-fly your query should =
look like this:
+
-
- The question mark represents a data set input parameter, which i=
s not the same as a report parameter.
- Now you need to define an new report parameter to pass the data to=
the report, call it JobTitle.
-
-
-
+]]> =
+ =
+ The question mark represents a data set input paramete=
r, which is not the same as a report parameter.
+ Now you need to define an new report parameter to pass the data to=
the report, call it JobTitle.
+ =
+ =
+ =
The dataset parameter can be linked to a report parameter.
- In the Data Explorer view click the Data Set =
node to open it and right-click
- on the data set you created previously( in our case it is HibernateDataSet),
- choose Edit and navigate to the Par=
ameters section.
- Declare a new data set parameter, name it jobtitle an=
d map it to the already existing JobTitle report parameter.
+ In the Data Explorer view click the=
Data Set node to open it and right-click
+ on the data set you created previously( in our case it is HibernateDataSet),
+ choose Edit and navigate to the Parameters section. =
+ Declare a new data set parameter, name it jobtitle=
and map it to the already existing JobTitle =
report parameter.
-
- You report is ready, you can view it by clicking on the Preview tab of the BIRT Report Designer =
editor.
+
+ You report is ready, you can view it by clicking on t=
he Preview tab of the BI=
RT Report Designer editor.
=
+ =
+ You will be prompted to assign a value to the repo=
rt parameter. For instance you can enter "Sales Rep".
=
- You will be prompted to assign a value to the report paramet=
er. For instance you can enter "Sales Rep".
-
-
- Resulted Dynamic Report
-
-
-
+
+ Resulted Dynamic Report
+
+
+
-
- Creating a Dynamic BI=
RT Report
=
- =
The Adding BIRT Function=
ality to Standard Seam Web Project
- and Using Hibernate O=
DA Data Sourc sections tell how to integrate a BIRT report into
+ =
+
+ Creating a Dynamic BIRT Report
+ =
+ The Adding BIRT Functionality to Standard Seam Web Project =
+ and Using Hiberna=
te ODA Data Sourc sections tell how to integrate a BIRT report into =
a Seam web project and how to use Hibernate data source to generat=
e a dynamic report.
- In this section we will create a Seam web project that can make a =
dynamic report using the parameters that are defined on a web page.
+ In this section we will create a Seam web project that can make a =
dynamic report using the parameters that are defined on a web page.
=
=
- =
We will use the PRODUCTS=
table of DATAMODELS database for the purpose of this demo project.
- In the first place, you need to generate Seam entities like we did=
in the previous chapter (Hibe=
rnate ODA Data Source ). The demo application will generate a report about the compan=
y's products, whereas it will allow to specify a product line.
+ We will use the PRODUCTS table of DATAMODELS database for the purpo=
se of this demo project.
+ In the first place, you need to generate Seam entities like we did=
in the previous chapter (=
Hibernate ODA Data Source ). The demo application will generate a re=
port about the company's products, whereas it will allow to specify a produ=
ct line.
=
-
-
- =
The next step is to create a Java class that will store the sor=
tOrder vari=
able and its assessors, register the class in faces.config.xml.
- The variable will be needed to pass dynamic data to the report via rep=
ort parameters, therefore it has to be of session scope.=
para>
+
+
+ The next step is to create a Java class that will stor=
e the sortOrder variable and its assessors, register=
the class in faces.config.xml. =
+ The variable will be needed to pass dynamic data to the report via rep=
ort parameters, therefore it has to be of session scope.
=
-
-
-
-
- The report will print the data from the Products table, hence you nee=
d to create a report file first.
- You can use either the BIRT JDBC Data Source or =
Hibernate Data Source data source to create the data set for thi=
s project. If you want to use the latter please read the previous chapter <=
/diffmk:wrapper>Hibernate ODA Data Source.
-
-
-
-
+
+
+ =
+ =
+ The report will print the data from the Products table, hence you need to create a report file first. =
+ You can use either the BIRT JDBC Data Source or Hibernate Data Source data source t=
o create the data set for this project. If you want to use the latter plea=
se read the previous chapter Hibernate ODA Data Source.
+ =
+ =
+ =
+
The data set should have at least the following data set items: prod=
uct vendor, product name, quantity in stock and buy price. The data is retr=
ieved from the database with this query :
-
-
-
-
+ =
+ =
+
+]]> =
-
- =
Make a table in the report and put each data set item into a column.
+
+ Make a table in the report and put each data set item =
into a column.
-
- As it was stated in the beginning of the chapter the report will be dyn=
amic, therefore you need to declare a report parameter first, let it be sortOrder and to add the parameter to the query. BIRT offers rich JavaScr=
ipt API, so you can modify the query programmatically like this:
-
+ =
+ As it was stated in the beginning of the chapter t=
he report will be dynamic, therefore you need to declare a report parameter=
first, let it be sortOrder and to add the parameter=
to the query. BIRT offers rich JavaScript API, so you can modify the query=
programmatically like this:
+
=
<xml-property name=3D"queryText"><![CDATA[
SELECT productvedor,
productname,
quantityinstock,
buyprice
-FROM Products as products
+FROM Products as products =
]]></xml-property>
<method name=3D"beforeOpen"><![CDATA[
queryString =3D " ORDER BY products."+reportContext.getParameterValue("sor=
tOrder")+" "+"DESC";
this.queryText =3D this.queryText+queryString;
]]></method>
-
-
+ =
+ =
-
-The report is ready. You c=
an preview it to make sure it works properly.
+
+The report is ready. You can preview it to make sure it wo=
rks properly.
- To set the report parameter you should create an .xhtml view page, call it Products.xhtml. On the page you can set the value of the sortOrder=
Java bean =
variable and press the Generate Report button to=
open another view page that will display the resulted report.
-
-
-
- =
The source code of the Products.xhtml should be=
the following:
-
- To set the report para=
meter you should create an .xhtml view page,=
call it Products.xhtml. On the page you can=
set the value of the sortOrder Java bean variable a=
nd press the Generate Report button to open=
another view page that will display the resulted report.
+
+ =
+ =
+ The source code of the Products.x=
html should be the following:
+ =
+ BIRT Report Generator
-
+ =
Select sort order criterion:
@@ -742,384 +760,417 @@
-
+ =
-
-]]>
- =
The logic of the file is quite simple, when the sort order criterion is sel=
ect the value of yourJavaBean.sortOrder
- is set automatically via Ajax and the report is ready to be generated.=
+ =
+]]> =
+ The logic of the file is quite simple, when the sort o=
rder criterion is select the value of yourJavaBean.sortOrd=
er
+ is set automatically via Ajax and the report is ready to be generated.=
=
-
- Now you need to create t=
he web page that will print the report, name the file ProductsR=
eport.xhtml.
- The file to output the report should have the following content:=
diffmk:wrapper>
-
-
-
- As you know from the Adding BIRT Functionality to Standard Seam Web Project chapter, before using the=
BIRT Integration framework tags on the page you need to declare the tag li=
brary and specify the name space with this line:
-
-
-
+ Now you need to create the web page that will print th=
e report, name the file ProductsReport.xhtml.
+ The file to output the report should have the following content:=
para>
+ =
+
+
-
- The dynamics to the report adds this line:
-
-
+
+
+ Products Report
+
+
+
+
+
+
+]]> =
+
+ As you know from the Adding BIRT Functionality to Standard Seam Web Project cha=
pter, before using the BIRT Integration framework tags on the page you need=
to declare the tag library and specify the name space with this line:
+ =
+ =
+ =
+
+ The dynamics to the report adds this line: =
+ =
+
-]]>
-
- =
We bound the sortOrder report parameter to Java Bean variable =
value=3D"#{yourJavaBean.sortOrder}" using EL expression, and the value to the variable=
is assigned in the Products.xhtml file.
- =
By default if you embed a report into HTML page the HTML-format report cont=
ains the <html>,
- <head>, <body> etc., tags. However if your HTML page a=
lready has those tags, you can rid of them using the embeddable=
=3D"true" a=
ttribute of
-
- the <=
;b:birt> component.
+]]> =
+ =
+ We bound the sortOrder report p=
arameter to Java Bean variable value=3D"#{yourJavaBean.sort=
Order}" using EL expression, and the value to the variable is assign=
ed in the Products.xhtml file.
+ By default if you embed a report into HTML page the HT=
ML-format report contains the <html>,
+ <head>, <body> etc., tags. However if your HTML page a=
lready has those tags, you can rid of them using the embedd=
able=3D"true" attribute of =
+ =
+ the <b:bir=
t> component.
-
- Deploy the project o=
nto the server and open your browser to see the report is successfully gene=
rated. You should navigate to
-
- http://localhost:8080/yourProjectName/Products.seam to select the =
criterion and press the Generate Report button. You will be redirected=
to the http://localhost:8080/HelloBirt/ProductsReport.seam
-
-
-
- Dynamic Report
-
-
-
+
+ Deploy the project onto the server and open your b=
rowser to see the report is successfully generated. You should navigate to =
+ =
+ http://localhost:8080/yourProjectName/Products.seam=
to select the criterion and press the Generate =
Report button. You will be redirected to the ht=
tp://localhost:8080/HelloBirt/ProductsReport.seam
+ =
+ =
+
+ Dynamic Report
+
+
+
- Thus, a Seam project =
that includes the BIRT facet can be deployed as any project. If you
+ Thus, a Seam project that includes the BIRT facet can=
be deployed as any project. If you
define the Hibernate ODA driver, the JBoss BIRT engine will use JN=
DI URL that has to be bound
to either Hibernate Session Factory or Hibernate Entity Manager Fa=
ctory. If you
don't specify the JNDI URL property, our engine will try the follo=
wing JNDI
- URLs:
-
-
-
- java:/<project_name>
+ URLs:
+
+
+
+ java:/<project_name>
-
-
- java:/<project_name>EntityManagerFactory=
emphasis>
+
+
+ java:/<project_name>EntityManage=
rFactory
=
- When creating a Seam EAR project, Hibernate Entity Manager Facto=
ry is bound to
- java:/{projectName}EntityManagerFactory. All you need to do is
+ When creating a Seam EAR project, Hibernate Entity Man=
ager Factory is bound to
+ java:/{projectName}EntityManagerFactory=
emphasis>. All you need to do is
to use the Hibernate Configuration created automatically. You can =
use default values for the
- Hibernate Configuration and JNDI URL within the BIRT Hibernate Dat=
a Source.
+ Hibernate Configuration and JNDI URL within the BIRT Hibernate Dat=
a Source.
=
- When using a Seam WAR =
project, neither HSF nor HEMF aren't bound to JNDI by
+ When using a Seam WAR project, neither HSF nor HEMF ar=
en't bound to JNDI by
default. You have to do this manually. For instance, HSF can be bo=
und to JNDI by adding the
- following property to the
- persistence.xml file:
+ following property to the
+ persistence.xml fil=
e:
=
-
+
]]>
=
- And you can use java:/projectname as the JN=
DI URL property when creating a BIRT
+ And you can use java:/projectname<=
/emphasis> as the JNDI URL property when creating a BIRT
Hibernate Data Source.
=
-
- Note:
- If you want to test this feature using PDE Runtime, you need=
to add
- osgi.dev=3Dbin
- to the
- WebContent/WEB-INF/platform/co=
nfiguration/config.ini
+
+ Note:
+ If you want to test this feature using PDE Runtime=
, you need to add
+ osgi.dev=3Dbin
+ to the
+ WebContent/WEB-INF/platform/configurat=
ion/config.ini file.
-
- In conclusion, the mai=
n goal of this document is to get you to know with a full feature set
- that JBoss BIRT Tools=
provide. Thus if you have some questions,
- comments or suggestions on the topic, please feel free to ask in t=
he JBoss
+ =
+ In conclusion, the main goal of this document is to ge=
t you to know with a full feature set
+ that JBoss BIRT Tools provide. Thus=
if you have some questions,
+ comments or suggestions on the topic, please feel free to ask in t=
he =
+ JBoss
Tools Forum. You can also influence on how you want to=
see JBoss Tools docs in
- future leaving your vote on the article Overview of the improvements required by=
JBossTools/JBDS Docs users.
+ future leaving your vote on the article Overview=
of the improvements required by JBossTools/JBDS Docs users.
=
-
=
=
-
+
+
+
+ =
+
=
-
+
=
- Eclipse
- JBoss
- JBoss Tools
- BIRT Integration
+ Eclipse
+ JBoss
+ JBoss Tools
+ BIRT Integration
=
- JBoss BIRT Integraion Framework API Reference
+ JBoss BIRT Integraion Framework API Reference
=
=
-
-
-
- <b:birt> Component
+
+ =
+
+ <b:birt&=
gt; Component
-
-
-
-
- The <b:birt> component servers to integrate a BIRT report into Seam/JSF container.
- The <b:birt> tag recognizes most of the parameters described on the BIRT
+ =
+ =
+ =
+
+ The <b:birt&=
gt; component servers to integrate a BIRT report into=
Seam/JSF container. =
+ The <b:birt&=
gt; tag recognizes most of the parameters described o=
n the BIRT =
Report Viewer Parameters page, though it has attr=
ibutes of its own.
-
+ =
-
-
-
+ <b:birt> Component Reference =
+
+
+
+ Attribute
+ Correspondance to BIRT Report Viewer para=
meters
+ Description/
+ =
-
-
- designType
- -
- Corresponds to the BIRT servlet mappings. Possible =
values are run, frameset, preview and embed.
- If the attribute is set to embed the component is used for
- embeddable html. This type ignores all the attributes exce=
pt designName
+
+
+ designType
+ -
+ Corresponds to the BIRT servlet mappings.=
Possible values are run, frameset, preview and embed. =
+ If the attribute is set to embed the component is used fo=
r =
+ embeddable html. This type ignores all the attributes exce=
pt designName =
and masterpage.
-
-
- embeddable
- -
- A BIRT report occupies the whole page by default. I=
t contains the <html>,
+ =
+
+ embeddable
+ -
+ A BIRT report occupies the whole page by =
default. It contains the <html>,
<head>, <body> etc., tags. Embedded report=
can be a part of another page.
It doesn't contain the above mentioned tags. Only HTML=
report can be embedded.
-
-
- designName
- __report
- Sets the name of the report design to process. This=
can be an absolute path or relative to the working folder. Valid values ar=
e run, frameset and preview
-
-
-
- format
- __format
- Specifies the desired output format, such as pdf, h=
tml, doc, ppt, or xls.
-
-
-
- title
- __title
- Sets the report title.
-
-
-
- showtitle
- __showtitle
- Determines if the report title is shown in the fram=
eset viewer. Defaults to true.
-
-
-
- toolbar
- __toolbar
-
-
+ =
+
+ designName
+ __report
+ Sets the name of the report design to pro=
cess. This can be an absolute path or relative to the working folder. Valid=
values are run, frameset and preview
+ =
+ =
+
+ format
+ __format
+ Specifies the desired output format, such=
as pdf, html, doc, ppt, or xls.
+ =
+ =
+
+ title
+ __title
+ Sets the report title.
+ =
+ =
+
+ showtitle
+ __showtitle
+ Determines if the report title is shown i=
n the frameset viewer. Defaults to true.
+ =
+ =
+
+ toolbar
+ __toolbar
+ =
+ =
Determines if the report toolbar is shown in the frame=
set viewer.Defaults to true. Valid values are true and false.
-
-
-
-
-
- navigationbar
- __navigationbar
-
-
+ =
+ =
+ =
+ =
+
+ navigationbar
+ __navigationbar
+ =
+ =
Determines if the navigation bar is shown in the frame=
set viewer. Defaults to true. Valid values are true and false.
-
-
-
-
- document
- __document
-
+ =
+ =
+ =
+
+ document
+ __document
+ =
Sets the name for the rptdocument. The document is cre=
ated when the report engine separates run and render tasks, and
- is used to support features like table of contents and=
pagination.
+ is used to support features like table of contents and=
pagination. =
This setting can be an absolute path or relative to th=
e working folder. If no document parameter is used, a unique document is cr=
eated in the document folder.
-
-
-
- locale
- __locale
-
+ =
+ =
+
+ locale
+ __locale
+ =
Specifies the locale for the specific operation. Note that this will =
override the default locale.
-
-
- svg
- __svg
-
+ =
+
+ svg
+ __svg
+ =
Specifies whether SVG is supported.
-
-
-
-
-
- page
- __page
-
+ =
+ =
+ =
+ =
+
+ page
+ __page
+ =
Specifies specific page to render.
-
-
-
-
- pagerange
- __pagerange
-
+ =
+ =
+ =
+
+ pagerange
+ __pagerange
+ =
Specifies page range to render. Eg 1-4,7.
-
-
-
-
- masterpage
- __masterpage
-
-
+ =
+ =
+ =
+
+ masterpage
+ __masterpage
+ =
+ =
Indicates that the report master page should be used o=
r not. Validvalues are true and false.
-
-
-
- overwrite
- __overwrite
-
-
- This setting if set to true will force an overwrite of=
the existing report document.
+ =
+ =
+
+ overwrite
+ __overwrite
+ =
+ =
+ This setting if set to true will force an overwrite of=
the existing report document. =
-
-
- bookmark
- __bookmark
-
-
+ =
+
+ bookmark
+ __bookmark
+ =
+ =
Specifies a specific bookmark within the report to loa=
d. The viewer will automatically load the appropriate page.
-
-
-
-
- rtl
- __rtl
-
+ =
+ =
+ =
+
+ rtl
+ __rtl
+ =
Specifies whether to display the report in right to le=
ft format. This setting defaults to false.
-
-
-
-
- fittopage
- __fittopage
-
+ =
+ =
+ =
+
+ fittopage
+ __fittopage
+ =
Specifies whether PDF generation should fit content to a p=
age. Valid values are true and false.
-
-
-
- resourceFolder
- __resourceFolder
-
+ =
+ =
+
+ resourceFolder
+ __resourceFolder
+ =
Specifies the resource folder to use. This setting will ov=
erride the default setting in the web.xml. The resource folder is used to l=
ocate libraries, images, and resource files.
-
+ =
-
+ =
-
-
- <b:param> Component
-
- The <b:param> tag describes report parameter.
+ =
+
+ <b:param> Component =
+
+ The <=
;b:param> tag describes report parameter.
-
-
+ <b:param> Component =
+
+
+
+ Attribute
+ =
+ Description
-
-
- name
- The parameter name. Required.
-
-
- value
- The parameter value. Required.
-
-
-
- isnull
- Specifies that a report parameter has a nul=
l value
-
-
- islocale
- Specifies whether the parameter is localize=
d
-
-
+
+
+ name
+ The parameter name. Required.
+ =
+
+ value
+ The parameter value. Required.
+ =
+ =
+
+ isnull
+ Specifies that a report parameter=
has a null value
+ =
+
+ islocale
+ Specifies whether the parameter i=
s localized
+ =
+ =
-
+ =
+ =
+ =
+ =
+ =
+ =
=
+
=
-
+ =
+ =
+
-
-
+
+
=
- Eclipse
- JBoss
- JBoss Tools
- BIRT Integration
+ Eclipse
+ JBoss
+ JBoss Tools
+ BIRT Integration
=
=
- Other Relevant Resources on the Topic
+ Other Relevant Resources on the Topic
=
- All JBoss Developer Studio/JBoss Tools release documentation you can fi=
nd at http://docs.jboss.o=
rg/tools i=
n the corresponding release directory.
- The latest documentation builds are available at http://download.jboss.org=
/jbosstools/nightly-docs.
+ All JBoss Developer Studio/JBoss Tools release doc=
umentation you can find at http=
://docs.jboss.org/tools in the corresponding release directory.
+ The latest documentation builds are available at <=
ulink url=3D"http://download.jboss.org/jbosstools/nightly-docs/">http://dow=
nload.jboss.org/jbosstools/nightly-docs.
=
-
+
=
=
--===============7751007362443340061==--