Jump to content
We've recently updated our Privacy Statement, available here ×

Multiple column


pedro.riky

Recommended Posts

Hi all

   i have a report that is divided in two column that are two data from different sources.

It is possible to pass at the jrxml two data sources and print it in two different colun?

In particular this report is the balance of a company with the current and the last year on two column.

 

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Yes, you would use one or two subreports to achieve this depending on how your queries are structured. 

If one query is the master and the other the slave then you use one subreport.  The main query goes in the main report and the slave query goes in the subquery.  The subreport is linked to the main report via a parameter in the subreport that is linked to a key field in the main query.

If there is no master-slave relationship between your subreports then you use two subreports.  The main report need to have a query that provides keys for each subreport. The subreports are linked to the main report via parameters linked to the appropriate key fields in the main query.

Check out these articles for information on how to use subreports:

http://jasperreports.sourceforge.net/sample.reference/subreport/index.html#subreports

http://bytecoded.blogspot.com/2009/12/jasperreports-370demosamplessubreport.html

 

 

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...