Jump to content
JasperReports Library 7.0 is now available ×

Make a 1-file report with different kind of data ?


mwk

Recommended Posts

Hi,

 

I want to generate a one file report which include different kind of data.

 

For example, i've a database which contains tables for sales, products, customers and I want to produce one PDF (only one) with these data in order to publish a global view of a situation with only one file !

 

Example of report :

 

page 1 : title, introduction...

pages 2 to n : list of customers sorted by name

pages n+1 : graph displaying origin of customers

pages n+2 to x : list of products sorted by references

pages x+4 to y : graph with evolution of sales

page end : conclusion, end...

 

My difficulty is to implement "pages n+1", "pages n+2 to x", "pages x+4 to y" in the same report but i can produce simple report like this :

 

page 1 : title, introduction...

pages 2 to n : list of customers sorted by name

page end : conclusion, end...

 

Is it possible to do that with iReport ? Is it possible to do this with an Java application ?

 

Thank you for your help!

 

Regards,

Michael

Link to comment
Share on other sites

  • 2 years later...
  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

There are several ways of reaching this.

 

the easiest (IMHO) would be to produce a MasterReport that holds two subReports (one below the other with positiontype = float)

SubReport 1 is responsible for presenting the customers (Detail of SubReport1) and the chart (Summary of SubReport1) 

SubReport2 does the job for the products (Detail of SubReport2) and list the charts again (Summary of SubReport2) for your products.

This structure allows you to easily use the SubReports as standalone reports also, to reuse them in other reports and to extend the report in future without modifying the existing layouts.

 

hth

C-Box

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...