672329 members! Sign up to stay informed.

Sponsored Links


Resources

Enterprise Java
Research Library

Get Java white papers, product information, case studies and webcasts

News News News Messages: 14 Messages: 14 Messages: 14 Printer friendly Printer friendly Printer friendly Post reply Post reply Post reply XML XML XML

DynamicJasper makes possible dynamic reporting in Java

Posted by: Juan Manuel Alvarez Gimenez on February 10, 2009 DIGG
DynamicJasper is an open source java library that complements and empowers Jasper Reports to the point of enabling dynamic report generation in runtime.

You can define in runtime which fields will be shown, which groups to add, define crosstabs, add sub reports and more taking care of the report layout. No need of jrxml files, and not leaving your IDE.

Integration with popular MVC frameworks: Struts 2 and WebWork are supported out of the box. A Grails plugin is available.

Dynamic column report: Columns can be defined at runtime, which means you also control (at runtime) the column positioning, width, title, etc.

Repeating groups / Breaking groups: Create repeating groups dynamically using simple expressions as criteria or complex custom expressions. Each repeating group may have a header and/or footer, which can have a variable showing the result of an operation (SUM, COUNT or any other provided by Jasper
Reports).

Automatic report layout: Just define a minimum set of options and DJ will take care of the layout. It's not an issue to generate the same report for different page sizes and orientation many more!

Dynamic Crosstabs: Jasper Report's popular crosstabs can now be created dynamically in an easy and convenient way.

Sub reports: Sub reports are supported; they can also be dynamically created.

Styles: Each column can have its own style for its title and detail data (defining border, border color, font size, type and color, background color, etc.). Style library from jrxml files are supported.

Calculation Variables: Repeating groups can have variables that hold the result of an operation on a given field (column). With DJ adding variables is a 1 line of code task.

JRXML template files support: You can use a base template jrxml file in which common styles, company logo, water mark, etc can be pre defined.

Conditional Format: DJ provides a very simple way to define conditional formats. You can use simple conditions or custom conditions.

Charts: Easy to add simple charts

Barcode columns: As simple as adding a regular column

Export to most popular formats: As DJ stands over Jasper Reports, it can export to PDF, XML, HTML, CSV, XLS, RTF, TXT.

Clean Excel export: DJ provides exporting plain reports to Excel, with no data formatting, no page break, etc. This is useful for end users that use this report to create dynamic tables in Excel, creating this reports just with Jasper Reports can demand a lot of design time.

Most of the features are provided directly by Jasper Reports, nevertheless through the DJ API some of the results are achieved with really no effort.

Threaded replies

·  DynamicJasper makes possible dynamic reporting in Java by Juan Manuel Alvarez Gimenez on Tue Feb 10 08:31:24 EST 2009
  ·  Re: DynamicJasper makes possible dynamic reporting in Java by Thai Dang Vu on Tue Feb 10 11:53:20 EST 2009
    ·  Re: DynamicJasper makes possible dynamic reporting in Java by Mariano Stampella on Tue Feb 10 13:54:56 EST 2009
      ·  Re: DynamicJasper makes possible dynamic reporting in Java by Scott Major on Tue Feb 10 14:41:02 EST 2009
        ·  Re: DynamicJasper makes possible dynamic reporting in Java by Juan Manuel Alvarez Gimenez on Wed Feb 11 07:21:41 EST 2009
          ·  Re: DynamicJasper makes possible dynamic reporting in Java by Mark Nuttall on Wed Feb 11 12:15:42 EST 2009
            ·  Re: DynamicJasper makes possible dynamic reporting in Java by Juan Manuel Alvarez Gimenez on Wed Feb 11 15:34:35 EST 2009
              ·  Re: DynamicJasper makes possible dynamic reporting in Java by Mark Nuttall on Wed Feb 11 23:08:22 EST 2009
      ·  Re: DynamicJasper makes possible dynamic reporting in Java by Juan Manuel Alvarez Gimenez on Wed Feb 11 07:04:03 EST 2009
  ·  Re: DynamicJasper makes possible dynamic reporting in Java by Diego Chavez on Tue Feb 10 13:59:56 EST 2009
  ·  Re: DynamicJasper makes possible dynamic reporting in Java by Federico Schroder on Tue Feb 10 14:16:56 EST 2009
  ·  Re: DynamicJasper makes possible dynamic reporting in Java by Mark Nuttall on Tue Feb 10 21:57:51 EST 2009
    ·  Re: DynamicJasper makes possible dynamic reporting in Java by Juan Manuel Alvarez Gimenez on Wed Feb 11 06:56:45 EST 2009
      ·  Re: DynamicJasper makes possible dynamic reporting in Java by Mark Nuttall on Wed Feb 11 12:10:13 EST 2009
  ·  Re: DynamicJasper makes possible dynamic reporting in Java by Matias Bagini on Thu Feb 12 06:22:46 EST 2009
  Message #304482 Post reply Post reply Post reply Go to top Go to top Go to top

Re: DynamicJasper makes possible dynamic reporting in Java

Posted by: Thai Dang Vu on February 10, 2009 in response to Message #304330
Is there any example of using DynamicJasper with JSF?

  Message #304486 Post reply Post reply Post reply Go to top Go to top Go to top

Re: DynamicJasper makes possible dynamic reporting in Java

Posted by: Mariano Stampella on February 10, 2009 in response to Message #304482
Unfortunately, there are no examples with JSF. So far, there are examples with GWT, and Struts2 and lately a Grails plugin. We are going to invite the community to a contest to build a reporting component using DJ, in wich we expect any version with Seam + JSF, but we are focusing our effort to Grails, trying to improve the plugin to be integrated with the Scaffold, making reporting pretty much easier.

  Message #304487 Post reply Post reply Post reply Go to top Go to top Go to top

Re: DynamicJasper makes possible dynamic reporting in Java

Posted by: Diego Chavez on February 10, 2009 in response to Message #304330
I've been using dj for a while, it is a extremely versatile tool. Its creators deserve all the recognition, well designed and functional to the needs for reporting.

  Message #304488 Post reply Post reply Post reply Go to top Go to top Go to top

Re: DynamicJasper makes possible dynamic reporting in Java

Posted by: Federico Schroder on February 10, 2009 in response to Message #304330
Congratulations for the latest release!
I'm glad to see that this already robust tool keeps evolving.

  Message #304490 Post reply Post reply Post reply Go to top Go to top Go to top

Re: DynamicJasper makes possible dynamic reporting in Java

Posted by: Scott Major on February 10, 2009 in response to Message #304486
What improvements have DJ in comparison with BIRT and what does integrate with scaffold mean?

  Message #304505 Post reply Post reply Post reply Go to top Go to top Go to top

Re: DynamicJasper makes possible dynamic reporting in Java

Posted by: Mark Nuttall on February 10, 2009 in response to Message #304330
How about limiting the resultset? I didn' see that right offhand.

  Message #304511 Post reply Post reply Post reply Go to top Go to top Go to top

Re: DynamicJasper makes possible dynamic reporting in Java

Posted by: Juan Manuel Alvarez Gimenez on February 11, 2009 in response to Message #304505
Hi Mark.

DJ helps on how to show the data in the report, and it automates the process of making the report layout. I thing that limiting the resultset should be part of the business layer.

I also think it would be very ambitious to add such feature, since data source may not be only JDBC Resultsets, there are many others types such as Bean collections, XML, Mondrean cubes, CSV, Hibernate HQL, etc... plus not all engines support limiting the result, and have many different syntax to achieve that.

Of course, we can always wrap the data source and use an internal counter and force it to tell "no more records" when the counter reaches the desired limit, but it would result in a waste of resources if the original data source comes with 10.000 rows and we are only showing 100.

In terms of data sources, DJ only passes by it to JasperReports, we don't touch it at all.

  Message #304512 Post reply Post reply Post reply Go to top Go to top Go to top

Re: DynamicJasper makes possible dynamic reporting in Java

Posted by: Juan Manuel Alvarez Gimenez on February 11, 2009 in response to Message #304486
live GWT demo of DynamicJasper here: http://dynamicjasperplayground.fdvs.com.ar/ar.com.fdvs.dj.example.djApp/djApp.html

  Message #304513 Post reply Post reply Post reply Go to top Go to top Go to top

Re: DynamicJasper makes possible dynamic reporting in Java

Posted by: Juan Manuel Alvarez Gimenez on February 11, 2009 in response to Message #304490
What improvements have DJ in comparison with BIRT?


BIRT will satisfy complex report design, but it may be too much for simple to medium complexity reports. Here is where DJ can be of great help, plus you can easily embed it to your application (web or desktop) while BIRT is only for web apps.

The runtime report designing can be a life savior when requirements ask for adding or removing columns from the report, positioning them on user's will, always maintaining a neat and consistent layout... too many pre-compiled report design would be needed... here is where DJ helps the most.

It is not a silver bullet (not at all!!!) but it fulfills a not-easy-to-get-in-java requirement, which are the dynamic column reports.

what does integrate with scaffold mean?


Oh... it's related to Grails. It means that DJ would come automatically integrated to grails applications when using the default scaffold, which makes the web application almost out of nothing, enabling reporting capabilities besides the CRUD operations.

  Message #304557 Post reply Post reply Post reply Go to top Go to top Go to top

Re: DynamicJasper makes possible dynamic reporting in Java

Posted by: Mark Nuttall on February 11, 2009 in response to Message #304511
Reports typically have "prompts". Some don't.

  Message #304558 Post reply Post reply Post reply Go to top Go to top Go to top

Re: DynamicJasper makes possible dynamic reporting in Java

Posted by: Mark Nuttall on February 11, 2009 in response to Message #304513
I don't think DynamicJasper can be compared to BIRT at all. I do like what DynamicJasper does though.

while BIRT is only for web apps

Not true. I use BIRT in Swing apps and Eclipse RCP apps.

but it may be too much for simple to medium complexity reports

BIRT works well on all types of reports.

  Message #304569 Post reply Post reply Post reply Go to top Go to top Go to top

Re: DynamicJasper makes possible dynamic reporting in Java

Posted by: Juan Manuel Alvarez Gimenez on February 11, 2009 in response to Message #304558
Sorry, you are right about web apps...

I'm the first to say there is no comparison between BIRT and DJ.
We are aware of DJ limitations, and we also know it's great potential.
I said it in my previous post, it is not a silver bullet in terms of reporting, yet it fulfills dynamic column reporting pretty well in a very flexible way.

  Message #304580 Post reply Post reply Post reply Go to top Go to top Go to top

Re: DynamicJasper makes possible dynamic reporting in Java

Posted by: Mark Nuttall on February 11, 2009 in response to Message #304569
Sorry, you are right about web apps...

I'm the first to say there is no comparison between BIRT and DJ.
We are aware of DJ limitations, and we also know it's great potential.
I said it in my previous post, it is not a silver bullet in terms of reporting, yet it fulfills dynamic column reporting pretty well in a very flexible way.

Sorry. I wasn't putting DJ down. I was just saying they do different things. BIRT and JasperReports are where the comparison should be.

  Message #304594 Post reply Post reply Post reply Go to top Go to top Go to top

Re: DynamicJasper makes possible dynamic reporting in Java

Posted by: Matias Bagini on February 12, 2009 in response to Message #304330
Looks great. I think it may save you a lot of time of writing .jrxml files, dealing with iReport, compiling those files, etc for just simple reports that could be defined more easily.

We're thinking of using it in our platform, specially because of the dynamic crosstab funcionality. Is it possible to do column/row rotation, drill down, sorting (when clicking in a column title) or drill through (for instance click on any cell and see the details of that value)?

New content on TheServerSide.comNew content on TheServerSide.comNew content on TheServerSide.com

Dependency Injection in Java EE 6 - Part 2

Reza Rahman continues to explore the features of the proposed JSR 299, Contexts and Dependency Injection for Java EE (CDI). When approved, it promises to be a key feature of Java EE 6. (January 21, Article)

Ted Neward Q&A: What you must know about JavaScript, Scala and more

Ted Neward is an independent consultant specializing in high-scale enterprise systems, and an authority in Java and .NET technologies. He is the author and co-author of several books, including Effective Enterprise Java. At TheServerSide Java Symposium in March, he will be presenting sessions on pragmatic architecture, ECMAScript and Scala. (January 15, Article)

Developers split on open sourcing Java

Now that Oracle is absorbing Sun Microsystems, there mixed views on what should come of the Java Community Process (JCP). While some say Oracle should become the new steward of Java and keep the JCP much as it was, others argue that it may be time to open-source this widespread language. (November 24, Article)

Dependency Injection in Java EE 6 - Part 1

Reza Rahman explores the features of the proposed JSR 299, Contexts and Dependency Injection for Java EE (CDI). When approved, it promises to be a key feature of Java EE 6. (November 2, Article)

SAML: It's Not just for Web services

SAML is an XML-based standard for exchanging authentication and authorization data between security domains. The single most important problem that SAML was created to solve is the Web browser Single Sign-On problem. Many organizations are debating whether to stay with version 1.1 or move to 2.0. This article makes observations about both options. (September 28, Article)

Programming is Also Teaching Your Team

Joe Ottinger takes a look at how people learn, and applies it to the practice of programming. He notes that understanding how people learn is an essential part of working in a programming team. (September 22, Article)

Can Java EE Deliver The Asynchronous Web?

Stephen Maryka gave us an article about the Asynchronous Web and posed a number of questions that get examined like an approach to delivering Asynchronous Web capabilities through extensions to existing Java EE technologies. (July 14, Article)

JSF Flex

JavaServer Faces Flex goal is to provide users capability in creating standard Flex components, part of flexSDK which is open sourced through MPL license, as normal JSF components. This article by Ji Hoon Kim will provide an overview of creating a simple multilingual JSF page consisting of JSF Flex tags. (June 29, Article)

The Rules of SOA - A Road to a Successful SOA Implementation

In this session Jeff explores the key characteristics of successful SOA projects. He covers some of the patterns, and anti-patterns, tool sets, and strategies that he himself learned the hard way. Last, he provides a strategy and blueprint for achieving a high likelihood of success in your SOA project. (June 23, Tech Talk)

Ari Zilka Talks About Terracotta 3.1

Ari Zilka, CTO of Terracotta, Inc., talks about the new features in Terracotta 3.1, announced during JavaOne and available now. (June 15, Tech Talk)

Enterprise Application Integration, and Spring

In this Tech Talk, Josh Long explores an integration challenge using Spring Integration and walks through the implementation, employing and expanding on the basic patterns of Enterprise Application Integration to tie together components into a function integration solution, and then demonstrates how Spring Integration helps address the integration requirements. (June 15, Tech Talk)

Google Web Toolkit: An Introduction

In this Tech Talk, David Geary teaches you: The basics of Google Web Toolkit; How to implement Ajax-enabled applications in Java; Internationalization; Hooking into the browser history mechanism; Remote procedure calls. (June 4, Tech Talk)

Just Enough Early Architecture to Guide Development

Jon Kern discusses the best architecture/technical solutions and ensure that they are repeated by all developers. By tackling the architecture up-front in a serial manner, subsequent parallel development will be much more manageable and predictable. (May 28, Tech Talk)

Productive Programmer: On the Lam from the Furniture Police

This keynote describes the frustrations of modern knowledge workers in their quest to actually get some work done, and solutions for how to guard yourself against all those distractions. Neal Ford talks about environments, coding, acceleration, automation, and avoiding repetition as ways to defeat the misguided attempts to sap your ability to produce good work. (May 26, Tech Talk)

Auto-Scaling Your Existing Web Application

Gil demonstrates how new, aggressive uses of already abundant compute capacity by common applications offer competitive value for application designers. (May 21, Tech Talk)

Automating Hibernate Mapping and Queries For Java Web Development

Chris Keene introduces WaveMaker as a new way to automate the ability to generate Hibernate classes in order to more quickly bring OR mapping into an application. (May 19, Article)

Free Book: Jakarta-Struts Live

Download the entire book of Jakarta-Struts Live and learn about Struts MVC, Tiles, the Validator, DynaActionForms, plug-ins, internationalization, and more.
(Book PDF Download)

Application Server Matrix

The Application Server Matrix is a detailed listing of J2EE vendors and their application server products, with information on latest version numbers, J2EE spec support and licensing, pricing, platform support, and links to product downloads and reviews.
(Application Server Comparison Matrix)

News | Blogs | Discussions | Tech talks | Patterns | Reviews | White Papers | Downloads | Articles | Media kit | About
Java Solutions
All Content Copyright ©2007 TheServerSide Privacy Policy
Site Map