password
username
Sponsored by CakeMail, an email marketing software
Newsletter preview

EclipseZone logo image
Thursday, December 06, 2007 

Are you Web 2.0-enabled?

Find out how Oracle WebCenter provides the declarative development of interfaces using standards like JavaServer Faces, JSR-168, WSRP 2.0, and a common metadata model for creating Web 2.0-enabled, composite applications.

Help yourself. Expert advice, free tutorials, sample code, and more.

 EZ News Corner
dzoneMost-clicked links this week
 
 EZ News Corner
 Next section
Virgil Dodson is a Java Evangelist at Actuate Corporation and a blogger/forum moderator at BIRT Exchange. Virgil has over 13 years experience as a software developer

Virgil Dodson Using the BIRT Web Project Wizard

The EclipseZone editorial team welcomes Virgil Dodson from Actuate with a guest editorial this week. Please be sure to send him some feedback.

Now that you have created your great looking BIRT reports, you need to deploy the design files to make them available to others. There are several different ways to deploy your BIRT report designs. These range from writing all the deployment code from scratch using the Report Engine APIs to writing no code at all with some of the commercial report servers. Somewhere in the middle, there is another option called the Web Viewer Example that will get you off to a nice start. This article will talk about the Web Viewer Example that ships with the Eclipse BIRT Runtime and introduce the BIRT Web Project Wizard that helps you integrate the Web Viewer and BIRT JSP tag library into a web application.

Introduction to BIRT
First, a little bit of information about BIRT. BIRT is a flexible, 100% pure Java reporting tool for building and publishing reports against data sources including databases, XML, Java objects, web services, and more. BIRT stands for Business Intelligence Reporting and Tools and is an Eclipse open source project that benefits from the rich capabilities of the Eclipse platform and a very active community of users. BIRT includes powerful report and chart designers, as well as runtime components for generating and deploying BIRT reports. The BIRT Report Designer provides easy-to-use wizards and point-and-click layout capabilities that are similar to many web page design tools. Finished reports are easily integrated with Java Server Pages, servlets, or existing Java applications and leverage existing application server infrastructure. The rest of this article assumes some level of familiarity with BIRT and will focus on using the BIRT Web Viewer from a BIRT Web Project and using the BIRT JSP tag library.

BIRT Web Project Wizard
To get started using the BIRT Web Project Wizard, you need to be using BIRT 2.2 or higher which can be downloaded here. While in the Eclipse IDE, select File | New | Project, and then select ‘Web Project’ from the ‘Business Intelligence and Report Tools’ section. Press Next and then provide a name for your project and select the Target Runtime for your deployment. I’m selecting Tomcat 5.5 for this example. You can browse and modify the rest of the available settings by selecting Next, or you can accept the defaults by pressing Finish.

Once you are finished, Eclipse will switch to the Java EE perspective so you can work with this type of web project. Locate your project in the Project Explorer and expand the WebContent folder to find index.jsp. Right click on that file and select Run As | Run on Server. Select the server you want to use or define a new server and press Next. Make sure your new BIRT Web Project is listed in the Configured Projects list on the right. Remove any other project that might be in this list and press Next and then press Finish. If everything went as expected, you will see a simple web page (see Figure 1) with a link to a report design example. Select ‘View Example’ to see the report. If you see “Congratulations” then you have successfully run the report.


Figure 1 – Web Viewer Example initial page

Once you have successfully run the example report, you can swap it out with a design of your own. Open index.jsp from the Project Explorer and look for a line near the bottom like the one below:

<a rel="nofollow" href="<%= request.getContextPath( ) + "/frameset?__report=test.rptdesign&sample=my+parameter" %>">View Example</a>

The web viewer is called by using URLs to the frameset servlet mapping and passes parameters specifying which report to run. To run your own report using this method, copy another rptdesign file to your project and replace ‘test.rptdesign’ with the name of your file. Notice that test.rptdesign used a parameter called sample and passed the value of ‘my+parameter’ to the report. Replace that part with your own parameter names and values if desired, or leave the parameters off the URL to use the default values. You can also add ‘__parameterpage=true’ to the URL to force the user to be prompted for the parameters.

If your report depends on external JDBC drivers, you will need to include those prior to running your report. To add your JDBC drivers so the viewer can see them, import your JDBC JAR files into the WEB-INF/platform/plugins/org.eclipse.birt.report.data.oda.jdbc_[version_xxx]/drivers directory. Run index.jsp again and select the View Example URL to run your report. If it was successful, you should see your report.


Figure 2 – Example Report running in the BIRT Web Viewer

BIRT JSP Tag Library
Another option for calling the BIRT Web Viewer from your web project is to use the BIRT JSP Tag Library. There are only 5 base tags (viewer, report, param, parameterPage, and paramDef) and each has several attributes. These JSP tags allow you embed reports or deal with parameters within your JSP page. The rest of this article will show you how to get started with the BIRT JSP tag library and show a few examples of the reports running within a JSP page. I won’t spend much time with the parameter tags as those were explained very well recently in this post from the BIRT World blog.

To get started using the BIRT JSP tag library, right click on WebContent in the BIRT Web Project and select New | Other… Select ‘JSP’ from the ‘Web’ category and then press Next. Provide a name for your JSP page and then press Next. Make sure ‘Use JSP Template’ is selected and then select ‘New JSP File (html,BIRT tag)’ and then press Finish. This JSP Template ensures that the taglib reference below is included.

<%@ taglib uri="/birt.tld" prefix="birt" %>

Once your page is created, you simply need to start typing “<birt…” to see the available tags (See Figure 3).


Figure 3 - BIRT JSP Tag Library

The ‘viewer’ tag allows you to generate and view a BIRT report and includes the Viewer toolbar with the report. The ‘report’ tag is the same as above except it does not include the toolbar. You can see that I used the ‘param’ tag with each to supply the parameter for the report. Output generated is shown in Figure 4. . <birt:viewer id="test1" reportDesign="test.rptdesign" width="600" height="200"> <birt:param name="sample" value="BIRT Rocks!"></birt:param> </birt:viewer>

<birt:report id="test2" reportDesign="test.rptdesign" width="600" height="200"> <birt:param name="sample" value="BIRT Rocks!"></birt:param> </birt:report>


Figure 4 - BIRT JSP Tag Library - 'report' tag and 'viewer' tag examples

If you want to prompt the user for the parameters instead of passing them in, you need to set the ‘showParameterPage’ attribute to ‘true’ like below. This will prompt the user for the parameters and then run the report in the same space allocated by the height and width parameters. (See Figure 5)

<birt:viewer id="test1" reportDesign="test.rptdesign" width="600" height="600" showParameterPage="true"> </birt:viewer>


Figure 5 - BIRT JSP Tag Library - 'viewer' tag using 'showParameterPage' attribute

These steps were intended to get you started with your BIRT Web Project deployment. There is more information available at the URLs below.

References
Official Eclipse BIRT Project Site: http://www.eclipse.org/birt Online BIRT Documentation: http://www.birt-exchange.com/modules/documentation/ BIRT Forums: http://www.birt-exchange.com/modules/forum/

Until Next Time,
Virgil Dodson
VDodson@birt-exchange.com

 Tips and Tricks
 
 Tips and Tricks
 Next section
 Back to top
Nearly every day, RJ and others, bring you the hottest tips and tricks from around the Eclipse universe. Have a hot tip? E-mail the editors at editors@eclipsezone.com.
Use Cheat Sheets to determine Command IDs

You can use the Simple Cheat sheet editor to determine the Command IDs used by the workbench. This allows you to then make use of them in your own menus, etc.

Full DiscussionPosted By: Evan Williams - (5 Replies)

Google Maps Mashup with BIRT

Report design that demonstrated integration between BIRT and the Google Maps API. When you run the report, click on any row in the Customer Data table. That will display the Google map and create a marker for the city in which the customer is located.

Full DiscussionPosted By: Vijay - (0 Replies)

Adding Web 2.0 style functionality to a BIRT report

Eclipse BIRT is a great open source reporting tool and you can now add Web 2.0 style functionality to your reports, making them highly interactive and providing a richer end user experience.

Full DiscussionPosted By: Vijay - (0 Replies)

Configure Tab Completion in Eclipse (almost)

TextMate proponents will often tout the power of tab completion in their favorite editor. But did you know that Eclipse has the capability for template insertion which is even more powerful and flexible?

Full DiscussionPosted By: Daniel Spiewak - (5 Replies)

Mylyn and Google Code

Using Mylyn to work on tasks in a project hosted at Google Code is pretty easy, thanks to the Generic Web Repository Connector created by Eugene Kuleshov. Although the connector provides a neat template for Google Code projects, I found that it still needs a little tweak to work properly.

Full DiscussionPosted By: Alex Ruiz - (0 Replies)

Using Log4J in Eclipse Equinox/OSGi

Eclipse Europa has Log4J available as a bundle in some packages; you can also download it from Orbit. But how do you configure it? We take a look at a simple way.

Full DiscussionPosted By: Alex Blewitt - (5 Replies)

View the list of bugday bugs with Mylyn

You can get a list of the open bugday reports from bugzilla ... and you can import it straight into Mylyn. Pick your own bug and fix it ...

Full DiscussionPosted By: Alex Blewitt - (3 Replies)

Debugging a failed Eclipse launch

Every now and again, questions like "Why doesn't eclipse start?" are posted on the newsgroups, or "The application cannot be found". How do you go about debugging these scenarios? This isn't an exhaustive list, but may be a good place to start. Do you have any other tips to add?

Full DiscussionPosted By: Alex Blewitt - (5 Replies)

Running last launched versus running currently selected

One of the new features of 3.3 is the ability to launch the selected editor, or the selected project if the current editor isn't launchable. Whilst it may be useful for Hello World programs and those new to Eclipse, there's a way to get the old behaviour back.

Full DiscussionPosted By: Alex Blewitt - (1 Replies)

Check out a plug-in from plug-ins view

With Mylyn, reporting bugs is incredibly easy. Wouldn't it be great if it was just as easy to fix them? This plug-in allows you to check out plug-ins from a repository, straight into your workbench for triage and fixing. You can even submit the patches back via Mylyn :-)

Full DiscussionPosted By: Alex Blewitt - (2 Replies)

 Ask EZ
 
 Ask EZ
 Next section
 Back to top
Everyone has questions, especially about a platform such as Eclipse that has so much potential to be customized. EclipseZone comes to the rescue as our editors answer nearly any question you can think of in our Ask EZ forum.
"Remote file too big" error while comparing.

File compare window shows the local file correctly but says "Remote file is too big" on the remote side when comparing the sync. files.

Full DiscussionPosted By: Hakan Urhan - (0 Replies)

exporting eclipse project without extra eclipse files/folders

How do I get a copy of my project folder & files without all the eclipse related file (.project, /.cache, /.settings etc).

Full DiscussionPosted By: Ben Keen - (1 Replies)

Ant and console output

FOP warning messages are only being displayed on the first run after opening Eclipse, not subsequent runs.

Full DiscussionPosted By: Dave Gerdt - (0 Replies)

Project properties Java compiler compliance level stored?

Where is the Project properties Java compiler compliance level selection stored? Hopefully not the registry as we want to add it to source control.

Full DiscussionPosted By: Tom Corcoran - (3 Replies)

Sharable Working Set

I am using Eclipse SDK Version: 3.3.0, actually i want to share my eclipse working set with my other team members. Plz help me in this regard.

Full DiscussionPosted By: ashish - (0 Replies)

C++ Getting Started Error

C++ Error on compile "hello world" application with Eclipse 3.3.1.1 and MinGW on Windows Vista. Problem with compiler paths?

Full DiscussionPosted By: ART_Adventures - (0 Replies)

Eclipse on Windows Vista (32 and 64 bit)

Question about Eclipse's Vista compatibility with the 32 and 64 bit versions, I currently have both installed and not sure if Eclipse works on 64 bit.

Full DiscussionPosted By: Brandon - (2 Replies)

All defined custom color are gone after restarting BIRT RCP Desginer or Ecl

All defined custom color are gone after restarting BIRT RCP Desginer or Eclipse. Any information will be appreciated

Full DiscussionPosted By: dermawan - (0 Replies)

Debugging

debugging in (eclispe S20070910-RC1)- did a help, software update, search for new features,Zend Debugger, and performed the install, restarted eclispe

Full DiscussionPosted By: Toby - (0 Replies)

Can't click on OK in project properties

I copied Eclipse from another computer where it worked just fine. Now, when I go to project properties, OK button ignores me.

Full DiscussionPosted By: Bojan Tomic - (0 Replies)

Setup the already Existing java project into Eclipse

How to set up the already existing java project into Eclispe. can any body suggest me the best solutions please. Thanks in advanve

Full DiscussionPosted By: mohammed haneef - (1 Replies)

connecting perspective to a view

my problem is that the views' addition is in such way that i don't have any instance of them,and i'd like to implement an observer-observable relation

Full DiscussionPosted By: regev - (0 Replies)

J3d Selecting DirectX within Eclipse

How can I force my J3D to render using DirectX instead of OpenGL? I'm having issues running my app via Remote Desktop and this is supposed to help.

Full DiscussionPosted By: Deanna - (0 Replies)

debugging/stepping code goes slow

when I debugg a load module, the pace of stepping through the code line is slow. I`m running eclipse in Solaris 9 machine.

Full DiscussionPosted By: kingdavid - (0 Replies)

debugging/stepping code goes slow

when I debugg a load module, the pace/speed/time of stepping through the code line is slow. I`m running eclipse in Solaris 9 enviroment.

Full DiscussionPosted By: kingdavid - (0 Replies)

Issue with TextActionHandler

TextActionHandler not working properly I am creating and using object of TextActionHandler, problem with this is that cut and copy actions are invok

Full DiscussionPosted By: sunny - (0 Replies)

Page Reporting

I am using eclipse how to create page reporting. Below in the message box I pasted the code . When I compile the code it show some errors Exception

Full DiscussionPosted By: karunakumar - (0 Replies)

String externalization

When I bring up the Externalize String Wizards, I don't see the option to use Eclipse's string externalization mechanism. I'm using Eclipse Europa 3.

Full DiscussionPosted By: queue - (0 Replies)

Content Assist Not Working

I just installed Eclipse Europa, upgrading from Eclipse 3.2. Now when I go to my projects in my workspace my content assist is not working.

Full DiscussionPosted By: Ryan - (0 Replies)

Requested Declared Service not activating plug-in

i have pluginA that declares a service. pluginB creates a tracker to consume that service. when pluginB asks for the service pluginA isn't activated

Full DiscussionPosted By: kevin - (0 Replies)

Project with multiple module, how to handle it in eclipse

A current project managed with maven, now, I try to learn eclipse. How does eclipse support multiple module project?

Full DiscussionPosted By: Zarick Lau - (2 Replies)

Export correct class-path

Problem with executing my project as a jar file and accessing external libraries. It works with eclipse but doesn't as a standalone.

Full DiscussionPosted By: Ronald - (0 Replies)

"go to declaration" in Eclipse 3.1.1

Two problems: "go to declaration" doesn't open entire file, and collapse option is gone. No changes made to prefernces.

Full DiscussionPosted By: Meidan Alon - (0 Replies)

ANT : copying directory to Eclipse_Home

Unfortunately, my ant script copies the directory as a subdirectory to the current project. My aim is to copy it to eclipse root dir

Full DiscussionPosted By: Thomas - (2 Replies)

Applet parameters in launch configuration

How do I add empty strings as parameters in the launch configuration? Or how do I edit the file manually?

Full DiscussionPosted By: Monika - (0 Replies)

 Popular at EZ
 
 Popular at EclipseZone
 Next section
 Back to top
A recap of some of the most popular and active EclipseZone discussions this week.
Getting Started with OSGi: Dependencies between Bundles

We continue our OSGi tutorial series with a look at how to partition your code into bundles, how to declare dependencies between bundles, and how bundles are resolved.

Full DiscussionPosted By: Neil Bartlett - (15 Replies)

Plugin dependency visualization plugin

Eclipse plugin visualization tool makes everyone's life easier, as it supports analytics and visualization. This plugin detects the cyclic dependencies and developer gets a good view of all dependencies.

Full DiscussionPosted By: Suresh Krishna - (5 Replies)

 Your Account
 
 Your Account
 Next section
 Back to top
Manage your account info for this and other DeveloperZone publications.
Manage your DeveloperZone membership details

Click on the following links to:


 Contact Info
 Next section
 Back to top
Here's how to reach us, we love to hear from you.
Email us
Send news items to editors@eclipsezone.com
Send questions, complaints, or suggestions to feedback@javalobby.org
Send advertising inquiries to advertise@javalobby.org
 
Call us
Our number is (919) 678-0300. We'd love to hear from you!

 Legal
 Back to top
The fine print we'd rather avoid completely.
Feel free to redistribute this newsletter in part or in full to your friends.

EclipseZone News is a service mark of DeveloperZone, Inc.
Copyright ©2001-2007 DeveloperZone, Inc.

Thank you for your continued support of DeveloperZone. If you prefer not to receive the EclipseZone weekly newsletter, send an e-mail to ***-eznews@javalobby.org and please ensure the actual email address to be removed is present.
DeveloperZone Inc., 113 Legault Drive, Cary NC 27513 USA