From jbosstools-commits at lists.jboss.org Mon May 11 11:30:10 2009
Content-Type: multipart/mixed; boundary="===============1789022016167928632=="
MIME-Version: 1.0
From: jbosstools-commits at lists.jboss.org
To: jbosstools-commits at lists.jboss.org
Subject: [jbosstools-commits] JBoss Tools SVN: r15156 -
branches/jbosstools-3.0.x/birt/docs/en.
Date: Mon, 11 May 2009 11:22:07 -0400
Message-ID:
--===============1789022016167928632==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: smukhina
Date: 2009-05-11 11:22:07 -0400 (Mon, 11 May 2009)
New Revision: 15156
Added:
branches/jbosstools-3.0.x/birt/docs/en/master_output.xml
Removed:
branches/jbosstools-3.0.x/birt/docs/en/master_output.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-717 merged changes from trunk are a=
dded to the corresponding branch =
Deleted: branches/jbosstools-3.0.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.0.x/birt/docs/en/master_output.xml 2009-05-11 15:=
18:11 UTC (rev 15155)
+++ branches/jbosstools-3.0.x/birt/docs/en/master_output.xml 2009-05-11 15:=
22:07 UTC (rev 15156)
@@ -1,1103 +0,0 @@
-
-
-
-
-
-
- =
-
-]>
-
- Birt Plugin Reference Guide
-
- AnastasiyaBogachukabogachuk(a)exadel.com =
- =
- =
- August 2008
-
- 2008
- 2009
- JBoss, a div=
ision of Red Hat
-
-
- Version: 1.0.0.GA
-
- =
-
-
-
-
- PDF version=
ulink>
-
-
-
- =
-
- =
-
- =
- =
-
-
-
-
-
- JBoss Developer Studio
- Eclipse
- Java
- JBoss
- JBoss Tools
- JBDS
- BIRT
- BIRT Plugin
-
-
-
- Introduction
-
-
-
- What is BIRT?
- BIRT plugin for JBoss Developer Studio is an Eclipse-based o=
pen source reporting
- system for web applications based on Java and J2EE. BIRT consi=
sts 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 t=
hat lets you add charts to
- your own Web application.
- With the help of BIRT you can generate a great number of rep=
orts to be used in your
- application:
-
-
-
- Lists
-
-
- Charts
-
-
- Crosstabs, or cross-tabulation, or matrix
-
-
- Letters and Documents
-
-
- Compound Reports
-
-
-
- In this guide we p=
rovide you with the information on BIRT Designer which allows to
- create a report much faster and with far fewer errors to spare=
your time.
-
-
- You can find detailed information on the BIRT report types a=
nd anatomy here: =
JBoss BIRT
-
-
- All JBoss Develope=
r Studio/JBoss Tools documentation you can find ondocumentation release page.
- The latest documen=
tation builds are available on documentation nightly builds page.
-
-
-
-
-
- =
-
-
-
-
- JBoss Developer Studio
- Eclipse
- BIRT
- Java
- JBoss
-
-
-
- BIRT Support
-
- In this section we will focus more on all concepts that JBos=
s Tools integrates for
- working with BIRT.
-
-
- BIRT Plugin Installation
- =
- This chapter will provide you with detailed =
information on how to install BIRT plugin into JBoss Developer Studio.
- =
- Since BIRT plugin is one of the modules of J=
Boss Tools project it has a dependence on other modules and will require th=
eir pre-installation. =
- =
- These are the prerequisites to create a web =
project including Seam and BIRT capabilities:
-
- Eclipse Version 3.4 SDK
- DTP Version 1.6 Release
- EMF Version 2.4 Release EM=
F+XSD
- GEF Version 3.4 Release ru=
ntime
- WTP Version 3.0 Release
- BIRT Re=
port Designer SDK 2.3.0 Release or BIRT Report Designer 2.3.0 Relea=
se
- JBoss Application Server 4=
.2.2 GA
- JBoss Seam 2.0.1 GA=
- BIRT=
Web Tools Integration
- JBoss Tools nightly build<=
/para>
- =
- =
- =
- =
- =
-
-
-
- =
- JBoss BIRT Integration
- To understand Hibernate configuration, integration with Seam=
, and deployment see JBoss BIRT Integration 1.0.0.alpha1 - New a=
nd Noteworthy.
- =
-
-
-
- Creating a BIRT Report
- In this chapter we suggest a step-by-step wa=
lk-through of creating your own BIRT report.
- =
- Create a Report Project
- =
- First create a Report project. Selec=
t File > New > Project...
- in the main menu bar or contex=
t menu. The new project dialog appears. Choose Business Intelligence and Reporting Tools > Report Project=
property>:
- =
-
- New Report Project Creation=
-
-
-
-
-
- =
- =
- Click on the Next button. Specify a name for the =
project and change location if necessary:
- =
-
- Specify a Name for the Report Proje=
ct
-
-
-
-
-
- =
- =
- Click on the Finish button. Click Ok to switch to the Report Design persp=
ective. Your Report Project is now created:
- =
- =
-
- New Report Project Created
-
-
-
-
-
- =
-
- =
- Create a Report
- Now you can create a Report. Go to File > New > Report...:
- =
-
- Create a New Report
-
-
-
-
-
- =
- =
- The new report dialog appears. Select the cr=
eated project as a parent folder in the tree view:
- =
-
- Select a Parent Folder
-
-
-
-
-
- =
- =
- Click on the Next button. Then select the type of th=
e template to use for your report. Each template is shown in the Preview wi=
ndow and is described below. Tick off the "Show Report Creation Cheat Sheet=
" checkbox if you don't need the Cheat Sheets view to be displayed. The Ch=
eat Sheets view can walk you though the process of creating a report based =
on the template you selected. =
- =
-
- Choose a Report Template
-
-
-
-
-
- =
- =
- =
- Click on the Finish button to open the newly creat=
ed report in the workspace:
- =
-
- Report Opened in the Workspace
-
-
-
-
-
- =
- =
- =
- =
-
- Build a Data Source
- =
- Data source is used to connect to th=
e database. In order to create a data source for your report follow these s=
teps:
- Open the Data Explorer View. Select Dat=
a Sources, right-click on it and choose New Data Source:
- =
- =
-
- Create a Data Source
-
-
-
-
-
- =
- =
- The New Data Source dialog appears. Choose the "Create from a data so=
urce type in the following list" radio button and then "Classic Models Inc.=
Sample Database". Click on the Next button:
- =
- =
-
- New Data Source
-
-
-
-
-
- =
- =
- The newly created data source detail=
s wll be displayed: Driver Class, Database URL and Database User:
- =
-
- New Data Source Details
-
-
-
-
-
- =
- Click on the Finish button to add the data source to t=
he data source for your report.
- =
- If=
you need to edit the data source, right-click on it and select the corresp=
onding option. =
-
- =
- =
- Build a Data Set
- =
- Data Set is a query to get and repre=
sent necessary column data from the data source specified. Select Data Sets=
in the tree view, right-click on it and select New Data Set:
- =
-
- Create a Data Set
-
-
-
-
-
- =
- =
- =
- The New Data Set dialog will appear.=
Enter a name for the Data Set Name field and ensure that the Data Source f=
ield shows the data source already created and that the Data Set Type field=
is set to "SQL Select Query". =
- Then click on the Next button:
- =
- =
-
- New Data Set Details
-
-
-
-
-
- =
- =
- Enter the following details into the query:<=
/para>
-
- =
- =
-
- Query Details
-
-
-
-
-
- =
- =
- =
- Click on the Finish button. The Edit Data Set windo=
w opens where you can change Data Source, Settings, Parameters and other de=
tails for the Data Set created. If switched to the Query page you can check=
the schemas within this database, you can expand them to see the list of t=
ables with their columns:
- =
- =
-
- Edit the Data Set
-
-
-
-
-
- =
- =
- Switch to the Preview page to test y=
our query and verify whether the list of customers appears:
- =
-
- Test the Query
-
-
-
-
-
- =
- =
- Click on the Ok button.
-
- =
- Create Report Layout
- =
- After the Data source and Data set =
are specified you can continue with the report layout. Please see the chapter to learn more about BIRT Report =
Designer.
- =
-
- =
- =
-
- =
-
-
- =
-
-
-
-
- JBoss
- BIRT
- BIRT Designer
- BIRT Report Designer
-
-
-
- BIRT Report Designer
-
- BIRT Designer is an intuitive and quite easy Eclipse-based set o=
f plugins to make reports.
- In this chapter we will describe its interface and its features to=
you.
-
-
- BIRT User Interface
-
- The central part of the user interface is the Layout Editor. It
- displays the whole process of building a report and contains t=
he following tabs:
-
-
-
- Layout - this is =
an area where you can edit
- your report design;
-
-
- Preview - runs yo=
ur report created and shows
- the output;
-
-
- Script - on this =
page you can add JavaScript
- to your report to customize its behavior;
-
-
- XML Source - this=
is an area where you can
- view and modify the XML source of your report;
-
-
- Master Page - use=
it to format page
- data.
-
-
-
- The next part of user interface is different Views that can be
- arranged around the Layout Editor area the way you like:
-
-
-
- Palette - shows t=
he standard report items you
- can add to your report using drag and drop.
-
-
- Outline - shows t=
he structure of your report
- as a tree view.
-
-
- Navigator - shows=
your projects and reports
- within the projects.
-
-
- Data Explorer - s=
hows your data sources, data
- sets and report parameters. You also can use this view=
to add data set columns
- to your report layout.
-
-
- Property Editor -=
displays properties for
- many report items.
-
-
- Properties View -=
shows all properties for a
- report item as a simple list.
-
-
- Library Explorer View - allows the reuse of
- report objects, such as tables, data sources and style=
s. Objects created for
- reuse are stored in a library file. The Library Explor=
er will display Libraries
- that exist in the Resource folder. Developed libraries=
can be added to the
- resource folder by selecting File=E2=86=92Pu=
blish Library in Resource
- Folder. The resource folder location ca=
n be configured.
-
-
-
-
-
-
-
-
- BIRT Report Designer Features
- Here are the main BIRT Report Designer features:
-
-
- Palette - contain=
s tables, labels, and
- charts. It is used in conjunction with the Layout View=
to design reports.
-
-
- Data Explorer - o=
rganizes your data sources
- and data sets. The Data Sets editor enables testing yo=
ur data set to check
- whether the report receives the correct data. You can =
also create cubes using
- your data sets (when building any dynamic cross tables=
) and design necessary
- report parameters.
-
-
- Resource Explorer=
- BIRT allows the reuse of
- report objects, such as tables, data sources and style=
s. Objects created for
- reuse are stored in a library file. To browse the cont=
ents of report libraries
- BIRT supplies the Resource Explorer view. This view li=
sts all libraries within
- the resource folder, in addition to other shared conte=
nt such as images and
- JavaScript files.
-
-
- Property Editor -=
shows the most commonly
- used properties. BIRT also integrates with the standar=
d Eclipse property view to
- display a detailed listing of all properties for an it=
em.
-
-
- Layout View - WYS=
IWYG editor. You can select
- any element from the Palette, drag and drop it to the =
report and then edit the
- way you like.
-
-
- Script Editor - s=
cripting adds business logic
- to reports during data access, report generation, or v=
iewing. The code editor
- provides standard features for editing scripts: syntax=
coloring, auto-complete
- etc. You also can debug scripts when the report is run=
ning.
-
-
- Report Preview - =
Report Preview is used to
- test your newly created report with some real data.
-
-
- Chart Builder - u=
sing the Chart Builder you
- can add any charts to the design of your report. Just =
select a chart type, then
- data and, finally, format the chart.
-
-
- Expression Builder - expressions are simple
- scripts that return a value. They are used to assign d=
ata values to report
- elements, build image locations, hyperlinks, parameter=
default values
- etc.
-
-
- Cheat Sheets - Ch=
eat sheets are small pices
- of useful documentation that lead you through a report=
creation process. Just
- select what you need and then follow the instructions.=
-
-
- Outline - this vi=
ew provides a compact
- overview of the entire report structure.
-
-
-
- In this guide we m=
ade a short overview of the BIRT plugin: its installation, support,
- features etc. that will help you to make your first steps with=
it.
-
-
-
-
-
- =
-
- =
-
-
-
- JBoss
- BIRT
- Seam
-
-
- Birt Integration
- =
- =
This chapter covers the steps required for BIRT Integration
- =
- =
- Adding JBoss BIRT functionality to the standard Seam web project
- =
- =
In this section you'll find out how to create a web project including Seam=
and BIRT capabilities
- =
-
- Prerequisites
- =
- These are the prerequisites required to create a Seam web project inclu=
ding with BIRT functionality:
- =
-
-
-
- Eclipse Version 3.4 SDK
-
-
-
-
- DTP Version 1.6 Release
-
-
-
-
- EMF Version 2.4 Release EMF+XSD
-
-
-
-
- GEF Version =
3.4 Release runtime
-
-
-
-
- WTP Version 3.0 Release
-
-
-
-
- BIRT Report Designer SDK 2.3.0 Release<=
diffmk:wrapper diffmk:change=3D"added"> or BIRT Report Designer 2.3.0 R=
elease =
-
-
-
-
- JBoss Application Server 4.2.2 GA
-
-
-
-
- JBoss Seam 2.0.1 GA
-
-
-
-
- BIRT Web Tools Integration
-
-
-
-
- JBoss Tools nightly build
-
-
-
-
- JBoss BIRT integration feature
-
-
-
- =
-
- =
-
- Creating a web project
- =
- Follow the next steps to create a web project
-
-
- Create a new Seam Web Project
-
-
- Choose the 2.0 version of the Seam facet
-
-
- Add the "Birt Reporting Runtime Component" facet
-
-
- =
-
- Adding "Birt Reporting Runtime Component" Facet
-
-
-
-
-
-
- =
-
-
- Or choose the "JBoss BIRT Integration Web Project"
- configuration
-
-
- =
-
- Choosing "JBoss BIRT Integration Web Project "
- Configuration
-
-
-
-
-
-
- =
-
-
- Create the birttests.xhtml, testbirt.xhtml and testbirt1.xhtml =
pages as
- follows:
-
-
-
- birttests.xhtml:
-
- =
- =
-
- =
- =
- =
- Welcome to JBoss BIRT! =
-
-
=
-
=
-
- =
-
-
- ]]>
- =
- =
-
- testbirt.xhtml:
-
- =
-
- =
-
- =
- ]]>
- =
-
- testbirt1.xhtml:
-
- =
- =
- =
- ]]>
- =
- =
-
-
- Try the tests out by accessing http://localhost:8080//birttests=
.seam with your web browser.
-
-
- =
-
- Trying the Tests out. First Page
-
-
-
-
-
-
- =
-
- Trying the Tests out. Second Page
-
-
-
-
-
-
- =
-
- Trying the Tests out. Third Page
-
-
-
-
-
-
- =
-
- Trying the Tests out. Forth Page
-
-
-
-
-
-
- =
- The birt tag recognizes most of the parameters described on the BIRT Report Viewer Parameters page. The attributes of the birt tag don't =
contain the "__" prefix. The param tag describes report parameters. It supp=
orts the following attributes:
-
-
- name - the parameter name (required)
-
-
- value - the parameter value (required)
-
-
- isnull - specifies that a report parameter has a null value (op=
tional)
-
-
- islocale - specifies whether the parameter is localized (option=
al)
-
-
- These tags are defined in the org.jboss.birt.core/resources/jboss-seam-=
birt.jar library that contains source.
- It is possible to embed a BIRT report in some Seam xhtml page. For inst=
ance:
-
- =
-
- Example:
-
-
-
-
-
-
- Products
-
-
-
-
-
-
-
-
-
-
-
-
-
- =
- ]]>
- =
-
- Embeding BIRT Report in Seam xhtml Page. First Page
-
-
-
-
-
-
- =
-
- Embeding BIRT Report in Seam xhtml Page. Second Page
-
-
-
-
-
- =
- =
-
- Embeding BIRT Report in Seam xhtml Page. Third Page
-
-
-
-
-
- =
- =
-
-
- =
- =
-
- Hibernate ODA Data Source
- =
- The JBoss BIRT Integration feature includes the Hibernate ODA Data Sour=
ce completely integrated with Hibernate Tools. You can use it in the way yo=
u use any of BIRT ODA drivers. For instance,
-
-
- run the Seam Generate Entities action
-
-
- This action will create a Hibernate Console configuration.
-
-
- create a new BIRT report
-
-
- =
-
- Creating New Birt Report
-
-
-
-
-
- =
- =
-
-
- add the Hibernate ODA datasource
-
-
- =
-
- Adding Hibernate ODA Datasource
-
-
-
-
-
-
- =
-
- Testing Connection
-
-
-
-
-
-
- =
- =
-
-
- add the Hibernate ODA dataset
-
-
- =
-
- Adding Hibernate ODA Dataset
-
-
-
-
-
-
- =
-
- Testing Query
-
-
-
-
-
-
- =
-
-
- All the HQL features like syntax highlighting, content assist, =
formatting, Drag and Drop, etc., are available to you here
-
-
-
- =
-
- HQL Features - Output Columns Section
-
-
-
-
-
-
-
- HQL Features - Preview Results Section
-
-
-
-
-
-
- =
- =
- You can create a BIRT report using this data source and data set.
- =
-
- Creating a BIRT report using this data source and data set
-
-
-
- =
-
-
- =
-
- BIRT Report -Preview Tab
-
-
-
-
-
-
- =
-
- Adding "Birt Reporting Runtime Component" Facet
-
-
-
-
-
-
- =
- You can also use parameters within the Hibernate ODA driver.
- =
-
- Using parameters within the Hibernate ODA driver.
-
-
-
-
-
-
- =
- =
-
- Adding New Parameter
-
-
-
-
-
-
- =
- =
-
- Previewing Results
-
-
-
-
-
-
- =
- =
-
- =
- =
- Deploying a BIRT report
- You can deploy this report by adding an action button to the Seam's CRU=
D xhtml file.
- =
-
- Adding Action Button
-
-
-
-
-
-
-
-
- create the testHibernateOda.xhtml file
-
-
- =
-
- birttests.xhtml:
-
- =
-
- =
-
-
- open the Articles.xhtml page
-
-
- =
-
- Opening Articles.xhtml Page
-
-
-
-
-
-
- =
-
-
- click the Birt PDF Report button
-
-
- =
-
- Birt PDF Report
-
-
-
-
-
- =
- =
- The JNDI URL property can be either Hibernate Session Factory or Hibern=
ate Entity Manager Factory. If a user doesn't specify this property, our en=
gine will try the following JNDI URLs :
-
-
- java:/<project_name>
-
-
- java:/<project_name>EntityManagerFactory=
-
-
- Note:
- If you want to test this feature using PDE Runtime, you need t=
o add osgi.dev=3Dbin to the WebContent/WEB-INF/platform/configuration/confi=
g.ini file =
-
-In c=
onclusion, the main goal of this document is to get you know with a full fe=
atureset that JBoss BIRT Tools provides. Thus if you have some questions, c=
omments or suggestions on the topic, please fell free to ask in the JBoss T=
ools Forum. You can also influence on how you want to see JBoss Tools docs =
in future leaving your vote on our page here.
-
-
-
-
- =
-
-
-
- =
- =
-
-
Copied: branches/jbosstools-3.0.x/birt/docs/en/master_output.xml (from rev =
15151, branches/jbosstools-3.0.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.0.x/birt/docs/en/master_output.xml =
(rev 0)
+++ branches/jbosstools-3.0.x/birt/docs/en/master_output.xml 2009-05-11 15:=
22:07 UTC (rev 15156)
@@ -0,0 +1,843 @@
+
+
+
+ =
=
+ =
+
+
+]>
+
+ Birt Plugin Integ=
ration Reference Guide
+
+ AnastasiyaBogachukabogachuk(a)exadel.com =
+ Olga<=
surname diffmk:change=3D"added">Chi=
kvina =
+ =
+ August 2008
+
+ 2008
+ 2009
+ JBoss, a division of Red Hat
+
+
+ Version: 1.0.0.GA
+
+ =
+
+
+
+
+ PDF version=
ulink>
+
+
+
+ =
+
+ =
+ =
+ =
+
+
+
+
+
+ JBoss Developer Studio
+ Eclipse
+ JBoss
+ JBoss Tools
+ JBDS
+ BIRT Plugin
+
+
+
+ Introduction
+
+
+
+ What is BIRT?
+ BIRT plugin 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 app=
lication.
+ With the help of BIRT you can generate a great number of rep=
orts to be used in your
+ application:
+
+
+
+ Lists
+
+
+ Charts
+
+
+ Crosstabs, or cross-tabulation, or matrix
+
+
+ Letters and Documents
+
+
+ Compound Reports
+
+
+
+ You can find more de=
tailed information on the BIRT plugin, its report types and
+ anatomy on the BIRT =
Homepage.
+
+ To understand the ba=
sic BIRT concepts and to know how to create a basic BIRT report,
+ refer to the Eclipse BIRT
+ Tutorials. What extensions JBoss =
Tools p=
rovides for
+ Eclipse BIRT you'll find out in the next sections.
+
+
+
+ JBoss BIRT Integr=
ation Functionality Overview
+
+ This reference guide=
describes the one module of the JBoss =
Tools p=
roject which =
+ performs the integration with BIRT. The integration includes th=
e following functionalities:
+
+
+ Hibernate =
ODA driver that includes a dialog to create HQL queries with
+ syntax-highlighting, content-assist, formatting as wel=
l as other functionalities
+ available in the HQL editor. There is also a possibili=
ty to add
+ parameters.
+
+
+ possibilit=
y to add JBoss BIRT functionality to the standard Seam web
+ project
+
+
+ BIRT JSF/S=
eam control
+
+
+ deployment=
of BIRT reports within web projects (Seam, JSF, etc.)
+
+
+
+ To enable JBoss Tools integration with BIRT you are intended to
+ have the next:
+
+
+ Eclipse with=
JBoss Tools<=
diffmk:wrapper diffmk:change=3D"added">
+ installed (how to install JBoss Tools on Eclipse, what
+ dependences and versions requirements are needed reed =
in the JBoss Tools Installation section)
+
+
+ BIRT Report =
Designer (BIRT Report Designer 2.3.2 =
+ you can download from Eclipse downloads site)
+
+
+ BIRT Web Too=
ls Integration ( BIRT WTP Integration 2.3.2 you can download from
+ Eclipse downloads site)
+
+
+
+
+ Note:
+ Versions of BIRT=
framework and BIRT WTP integration should be no less than RC4 in
+ order to the BIRT facet works correctly.<=
/para>
+
+
+
+
+ Other Relevant Resources on the Topic
+
+ All JBoss Developer Studio/JBoss Tools release documentation you can fi=
nd athttp://docs.jboss.or=
g/tools in=
the corresponding release directory.
+ The latest documenta=
tion builds are available at http://download.jboss.org/jbosstools/nightly-docs=
.
+
+
+
+
+ =
+
+
+
+
+
+ JBoss
+ BIRT
+ Seam
+
+
+ Adding BIRT Functionality to Standard Seam Web Project
+
+ =
In this chapter you'll know how to create a Seam web project with BIRT
+ capabilities included.
+
+ =
You are supposed to have Seam runtime and JBoss Application Server download=
ed and
+ extracted somewhere on you hard drive.
+
+
+ Tip:
+ We usedJBoss Seam 2.0.1 GA and JBoss Appl=
ication Server 4.2.2 GA in examples of this guide.
+
+
+
+ Creating Seam Web=
Project with Birt Facet
+
+ First, open Seam perspective by going to
+ Window > Open Perspective > Other &=
gt; Seam.
+ To create a new Seam Web project follow to
+ File > New > Seam Web Project
+ (or
+ File > New > Other > Seam > S=
eam Web
+ Project
+ if you are=
not in the Seam perspective).<=
/para>
+
+ On the first wizard =
page enter the project name, then specify the target runtime and
+ target server. In the
+ Configuration
+ section cl=
ick
+ Modify
+ to configu=
re the project facets.
+
+
+ Creating Seam=
Web Project
+
+
+
+
+
+
+
+ Choose the 2.0 ver=
sion of the
+ Seam
+ facet an=
d enable the
+ Birt Reporting Runtime Component
+ facet.
+
+
+ Adding the Bi=
rt Reporting Runtime Component Facet
+
+
+
+
+
+
+
+ Or you can just choose the
+ JBoss BIRT Integration Web Project
+ configur=
ation.
+
+
+ Choosing the =
JBoss BIRT Integration Web Project Configuration
+
+
+
+
+
+
+
+ Next three pages a=
re filled out with defaults, just leave them through by pressing
+ Next. On the
+ Seam Facet
+ page you=
should specify the Seam runtime and Connection profile.=
para>
+
+
+ Configuring t=
he Seam Facet settings
+
+
+
+
+
+
+
+ Hit
+ Finish
+ to create =
the project with Birt functionality enabled.
+
+
+
+ Integration with =
Seam
+
+ The JBoss BIRT Integration feature contains the BIRT tag that allows th=
e user to add a
+ BIRT report to an
+ .xhtml
+ file:
+
+
+ =
+]]>
+
+ Let's look how it works.
+ Create in the
+ Web Content
+ folder thr=
ee
+ .xhtml
+ pages with=
the following content:
+
+
+
+
+
+ birttests.xhtml<=
/property>:
+
+ =
+
+ =
+ =
+ =
+ =
+ Welcome to JBoss BIRT=
! =
+
+
=
+
=
+
+ =
+
+ ]]>
+
+
+
+
+ testbirt.xhtml:
+
+
+ =
+
+]]>
+
+
+
+
+ testbirt1.xhtml<=
/property>:
+
+ =
+]]>
+
+
+
+ Now start the application server by clicking the
+ Start
+ option in =
the context menu of the server in the JBo=
ss Server
+ View (if the view isn't open go to
+ Window > Show View > Other > JBo=
ss Server
+ View). Try the tests out by accessing
+ http://localhost:8080/hellobirt/birttests=
.seam
+ in your we=
b browser.
+
+
+ Welcome Page =
in the Browser
+
+
+
+
+
+
+
+ Now if you click
+ Test Birt
+ you should=
see the following
+ .pdf
+ file:
+
+
+ After Clickin=
g Test Birt
+
+
+
+
+
+
+
+ After clicking
+ Test Birt 1
+ the next p=
age is displayed:
+
+
+ After Clickin=
g Test Birt 1
+
+
+
+
+
+
+
+ Put the
+ test param
+ as Sample =
Parameter value, specify the maximum possible Customer Number as
+
+ 1001, for instance, and then press
+ Ok. You'll see the following BIRT
+ report:
+
+
+ BIRT Report i=
n the Browser Window
+
+
+
+
+
+
+
+ The BIRT tag recognizes most of the parameters described on the
+ BIRT Report Viewer Parameters page. The attributes of the BIRT tag
+ don't contain the
+ "__"
+ prefix.
+
+ The
+ param
+ tag descri=
bes report parameters (see the listing for the
+ testbirt.xhtml
+ above). It=
supports the following attributes:
+
+
+
+ name
+ - =
the parameter name (required)
+
+
+
+ value
+ - =
the parameter value (required)
+
+
+
+ isnull
+ - =
specifies that a report parameter has a null value
+ (optional)
+
+
+
+ islocale
+ - =
specifies whether the parameter is localized (optional)
+
+
+
+ These tags are defined in the
+ org.jboss.birt.core/resources/jboss-seam-=
birt.jar
+ library th=
at contains source.
+
+ It is also possible to embed a BIRT report in some Seam
+ .xhtml
+ page. See =
how it may be done:
+
+
+
+ Example:
+
+
+
+
+
+
+ Products
+
+
+
+
+
+ =
+
+
+
+]]>
+
+ See the result in a Browser:
+ =
+
+ Embedding BIRT Report in Seam xhtml Page
+
+
+
+
+
+
+
+
+
+
+ =
+
+
+
+
+
+ JBoss
+ BIRT
+ Seam
+
+
+
+ Hibernate ODA Data Source
+
+ =
The JBoss BIRT Integration feature includes the Hibernate ODA Data Source c=
ompletely
+ integrated with Hibernate Tools. You can use it in the way you use=
any of BIRT ODA drivers.
+ Let's perform simple actions that demonstrate it.=
+
+ =
First, run the
+ Seam Generate Entities
+ action (You ca=
n access it from
+ File > New > Seam Generate Entities
+ in the Seam perspective. More details on the Seam Generate
+ Entities read in our =
Seam Dev Tools Reference guide). This action will create a Hibernate Console
+ configuration.
+
+
+ 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 De=
v Tools Reference
+ guide.
+
+
+ =
Next add a new BIRT report. To do that navigate to
+ File > New > Other > Business Intell=
igence and Reporting
+ Tools > Report. In the New Report
+ wizard enter the report name, for instance
+ testHibernateOda.rptdesign=
property>, then click
+ Finish.
+
+
+ Creating a New BI=
RT Report
+
+
+
+
+
+
+
+ Now switch to the Report Design perspective.
+
+ In the =
Data Explorer View right-click the
+ Data Source
+ node and choos=
e
+ New Data Source.
+
+
+ Creating a New Da=
ta Source
+
+
+
+
+
+
+
+ In the wizard select
+ Hibernate Data Source
+ and give it a =
proper name,
+ HbDataSource
+ for instance. =
Hit
+ Next.
+
+
+ Creating Hibernat=
e Data Source
+
+
+
+
+
+
+
+ On the next wizard page =
leave everything as it is, just press the
+ Test Connection
+ button to veri=
fy the connection is successful.
+
+
+ Hibernate Data So=
urce Profile
+
+
+
+
+
+
+
+ Click <=
emphasis diffmk:change=3D"added">
+ Ok
+ and then
+ Finish
+ to complete.=
+
+ Now let's add a Hibernat=
e ODA dataset. To do that you should bring up the
+ New Data Set wizard. In the Data Explorer View
+ right-click the
+ Data Set
+ node and selec=
t
+ New Data Set.
+
+
+ Creating a New Da=
ta Set
+
+
+
+
+
+
+
+ In the =
+ Data Set Name
+ section specif=
y the name. Let's it be
+ HbDataSet.
+
+
+ Creating a Hibern=
ate ODA Data Set
+
+
+
+
+
+
+
+ Next you'll be prompte=
d to define the query for this data set. To validate the
+ 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 you here.
+
+
+ Testing Query
+
+
+
+
+
+
+
+ Next the output column=
s will be displayed. It's possible to edit them
+ here.
+
+
+ HQL Features - Ou=
tput Columns Section
+
+
+
+
+
+
+
+ To preview the results=
of the defined query click the
+ Preview Results
+ item.
+
+ HQL Features - Pr=
eview Results Section
+
+
+
+
+
+
+
+ =
So far you have the Hibernate data source and data set defined. Now you can=
create a BIRT
+ report using this data source and data set.
+
+
+ Tip:
+ If you don't know ho=
w to do this we suggest that you refer to the Eclipse BIRT Tutorial.
+
+
+
+ Creating a BIRT R=
eport using Created Data Source and Data Set
+
+
+
+
+
+
+
+ If you switch to the <=
/diffmk:wrapper>
+ Preview tab, it will run your report and show the output.
+ =
+
+ BIRT Report -Prev=
iew Tab
+
+
+
+
+
+
+
+ You can also use paramet=
ers within the Hibernate ODA driver.
+
+
+ Using Parameters within the Hibernate ODA Driver
+
+
+
+
+
+
+
+
+
+ Adding New Parameter
+
+
+
+
+
+
+
+ =
Again, to preview the results switch to the
+ Preview Results
+ item.
+
+ Previewing the Results
+
+
+
+
+
+
+
+
+
+ =
+
+
+
+
+
+ JBoss
+ BIRT
+ Seam
+
+
+
+ BIRT Reports Deployme=
nt
+
+ When everything is con=
figured correctly you will be able to view/render the designed
+ reports in your Seam (or any other) Web application.
+
+ You can deploy a report =
by adding an action button to the Seam's CRUD
+ .xhtml
+ file.
+
+
+ Adding Action Button to the Seam file
+
+
+
+
+
+
+
+ As you can see on the fi=
gure you should have the
+ testHibernateOda.xhtml
+ file. It's con=
tent should be the following:
+
+
+ =
+
+]]>
+
+ Next run the Seam page w=
ith embedded report on the server by right-clicking the file and
+ going to
+ Run > Run on Server.
+
+
+ Opening Employees.xhtml Page
+
+
+
+
+
+
+
+ After clicking the
+ BIRT PDF Report
+ button, you sh=
ould see the following report:
+
+
+ Birt PDF Report
+
+
+
+
+
+
+
+ Thus, a Seam project tha=
t 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 bind
+ 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>
+
+
+
+
+ java:/<project_name>EntityManagerFactory
+
+
+
+
+ When creating a Seam EAR=
project, Hibernate Entity Manager Factory is bound to
+ java:/{projectName}EntityManagerFactory. All you need=
to do is
+ using the Hibernate Configuration created automatically. You can u=
se default values for the
+ Hibernate Configuration and JNDI URL within the BIRT Hibernate Dat=
a Source.
+
+ When using a Seam WAR pr=
oject, neither HSF nor HEMF aren't binded to JNDI by
+ default. You has to do this manually. For instance, HSF can be bou=
nd to JNDI by adding the
+ following property to the
+ persistence.xml=
emphasis> file:
+
+
+ ]]>
+
+ And you can use java:/projectname 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/configuration=
/config.ini
+ file.
+
+ In conclusion, the main =
goal of this document is to get you know with a full featureset
+ that JBoss BIRT Tools provide. Thus i=
f 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 d=
ocs in
+ future leaving your vote on our page here.
+
+
+
+
+
--===============1789022016167928632==--