• 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 ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Dynamic columns in jasper reports

 
Greenhorn
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:
Features

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



    Regards
    Hugo
    [ July 03, 2008: Message edited by: Hugo Balmaceda ]
     
    Greenhorn
    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

    addGlobalFooterVariable
    setGrandTotalLegend



    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
     
    You showed up just in time for the waffles! And this tiny ad:
    Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    reply
      Bookmark Topic Watch Topic
    • New Topic