tinti Posted March 28, 2012 Share Posted March 28, 2012 I have a report with one subreport.Something like this.MasterReport.jrxmlSQL > select name from user=Header TextField > name=Detail1 Subreport > Subreport.jrxml=Detail2 pageBreak=Footer TextField > nameUse for reference this table as a result from the MasterReport select.NAME--------Darth VaderYodaJohnny B GoodAnd now the Subreport.jrxmlSQL > select 1 from dual=DetailEmpty space or a Static Field, whatever.So, the problem is that the user name, wich should apear on header and footer is diferent for each page and aparently the problem is about the pagebreak and the subreport. I've done some tests with the MasterReport without the subreport, but with a pagebreak at the end of the detail band and the report printed normaly. But with the other detail and the pagebreak, the report goes crazy and print something like this.Page1=HeaderDarth Vader=Detail=FooterYodaPage2=HeaderYoda=Detail=FooterJohnny B GoodPage3=HeaderJohnny B Good=Detail=FooterJohnny B GoodThe data is wrong on the footers of all pages. It should be the same as the header, but it is not printing that way.Am i doing something wrong?Att,Angelo Tinti Link to comment Share on other sites More sharing options...
tinti Posted March 28, 2012 Author Share Posted March 28, 2012 I've done some tests and aparently the problem is with the stretch propertie. When i set the detail2 height to 0 and put a subreport (the element, not the report) in there with height 0, the preview of the report goes crazy and print the footer with the wrong informations. But, if i set the detail band with the size of the subreport (the sum of all details on the Subreport.jrxml), and i set the size of the element subreport with the same value, it works. 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