kastaliec Posted September 29, 2009 Share Posted September 29, 2009 Hi!I have records from DB in which there is field "Quantity". I need report with records, that will be duplicated as many times as "Quantity" field says.Can I make such report using Jasper Reports? How?Thank you in advance. Link to comment Share on other sites More sharing options...
Teodor Danciu Posted September 29, 2009 Share Posted September 29, 2009 Hi, You could use a subreport to display each record. The fields from the current record could be passed to the subreport as parameters, and the subreport would display them in its details section. In order to repeat the subreport details section "Quantity" times, you supply this data source to the subreport: new JREmptyDataSource($F{Quantity}.intValue()) Check the /demo/samples/subreports sample provided with the JR project, for more details about using subreports. I hope this helps.Teodor Link to comment Share on other sites More sharing options...
kastaliec Posted September 29, 2009 Author Share Posted September 29, 2009 Thanks a lot! It was really helpfull. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now