• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

Dynamic columns in jasper reports

Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
DynamicJasper is an open source Java API that works over JasperReports that solves the dynamic columns issue.

It is very well documented with lots of examples.

Here you have an example

and this is the results

As you can see, you can also define groups, styles, etc...

Some of its features are:

Most of the features are provided directly by Jasper Reports, but through the DJ API, some of the results are achieved with much less effort.

  • Dynamic column report

  • Columns can be defined at runtime, which means you also control (at runtime) the column positioning, witdh, title, etc.

  • Repeating groups, Breaking groups

  • You can 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 and operation (SUM, COUNT or any other provided by Jasper Reports).

  • Dynamic Crosstabs

  • JasperReport's popular crostabs can now be created dynamically in a ver easy and convinient way.

  • Sub reports

  • Sub reports are supported, they can also be dynamically created.
    Concatenating many reports in a single one (eg: a single PDF) can be a hard task.
    Using DynamicJasper it is really easy get reports of different nature in a single one.

  • Elemnt 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.)

  • Variables

  • As told before, repeating groups can have variables that hold the result of and operation on a given field (column).

  • Calculated Columns

  • The DJ API provides a very friendly way to create calculated columns, this columns may shown the result of an operation between one, two or more columns. I.e.: for some reason the data source does not provide a column that should contain the result of �column A * column B�, you can create a calculated column to solve this problem.
    The operation can also be a custom operation (created in Java) that can�t (for example) concatenate or more columns, transform it contents, etc.

  • Conditional Format

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

  • Exporting to most popular formats

  • As DJ stands over Jasper Reports, the output formats will be any given by the latter, but one of the most valuable features that DJ provides is exporting plain reports to excel, with no data formatting, no page break, etc. This is very valuable 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.

  • Many more�

  • Don�t stop looking at the ready-to-run examples

    [ July 03, 2008: Message edited by: Hugo Balmaceda ]
    Posts: 4
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    how to add tite for the column Groups?

    you have two methods to find grand total and put the tile


    how can we set title for subtotal
    addFootervariable =====================used to find the subtotal
    Is there is any method for sub total set title

    please help me
    Every plan is a little cooler if you have a blimp. And a tiny ad.
    a bit of art, as a gift, that will fit in a stocking
      Bookmark Topic Watch Topic
    • New Topic