Creating Dynamic Report with conditional output?

Hi all,

I have been tasked to create a multipage report that contains a page for each employee containing their sales for the week. The report will consist of three sections.

  • Header consisting of  three tables. One table can be optional depending on which company is generating the report.
  • The body will consist of one or more tables.The number of rows in these tables will be different depending on the data returned.
  • Footer will consist of two tables. ne of the tables will be shown only if there is data to populate it.

I do not have a datasource tied directly to the report. I populate multiple Map objects with the data returned from two sql queries. The main map is keyed by employee id and has a HashMap containing the employee's data. I need to iterate through the main Map and create a page for each employee. I have made xml template files to represent format of each section of the report page. There will be additional template files if a particular company wants a different look and feel to the sections.

I am on a very tight schedule so I have been looking at alternatives to create the report with out having to do a lot of programming. Is it possible to create this type of report using JasperReports?

Thank you in advance.


Below is what the output will look like for each individual page.


gageller12's picture
Joined: Sep 4 2015 - 8:29pm
Last seen: 6 years 11 months ago

I also have to be able to output these reports in html or pdf formats

gageller12 - 6 years 11 months ago

Hi Gageller12,

This can be easily achieved by using Sub Reports in jasperstudio.


Rajesh Sirsikar

rajesh.sirsikar - 6 years 11 months ago
Thank you Rajesh for the quick response. Would you be able point me in the right direction for any tutorials or examples I can look at to get me started? Thank you again for your help, Greg
gageller12 - 6 years 11 months ago

0 Answers:

No answers yet