Jump to content

Newbie question : generating invoice


hanland

Recommended Posts

I'm new to jasper / ireports, so far it's great so much more easy to setup and produce printed reports. Having fought with BIRT ....

 

My question is, I have an XML remote datasource, that works fine, but I have an invoice node which has the invoice number, creation date etc and then a set of nodes for each line entry in the invoice. It seems that I can either have the invoice details and one line entry printed or all the line entries and no invoice details.

 

Is this a case for a subreport for the line details and the invoice details are picked up by the main report?

 

In BIRT you could specify a table which could be populated with, in this case the line information

 

Regards

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

I think you need to have a main report with an xpath query that gets you the invoice nodes and writes out the creation date, etc. This will be written out in the detail band of the main report.

 

Also included in this detail band will be subreport.

 

You can feed the subreport with a data expression that creates a new JRXmlDataSource off the main document, but with an Xpath query that gets the invoice details for the invoice node you are on.

 

HTH

Link to comment
Share on other sites

I get the idea, I just had to read the chapter on setting up the datasource with the correct usage and path and it now works a treat. I now have a subreport for the address to deal with variable number of address lines and one for the invoice lines. It is actually more flexible than BIRT and will allow for reusage.

 

Thanks

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