Hi,
i have a little problem, i summarize:
- I have a master report, and in the detail band, i add a subreport. The subreport (subreport 1 since now) has to show a list of JavaBeans (i call this JavaBean "A").
I only use the detail band in the subreport 1, and inside it i put the next elements:
- Right at the top, a TextField $F{A.attribute1} (attribute1 is a String attribute)
- Below it, a subreport (subreport 2), which must show a list of JavaBeans (JavaBean "B") which are stored in A.
- At the bottom of the detail band, i use more TextFields to show other String attributes from A.
The problem i have is , when the pdf file is generated, the last textfields appear in the middle of the content of the subreport 2, and not below it, what should be the correct situation.
Any help will be appreciated, and i apoligize if my english is not well enough. :)
Thanks in advance!
i have a little problem, i summarize:
- I have a master report, and in the detail band, i add a subreport. The subreport (subreport 1 since now) has to show a list of JavaBeans (i call this JavaBean "A").
I only use the detail band in the subreport 1, and inside it i put the next elements:
- Right at the top, a TextField $F{A.attribute1} (attribute1 is a String attribute)
- Below it, a subreport (subreport 2), which must show a list of JavaBeans (JavaBean "B") which are stored in A.
- At the bottom of the detail band, i use more TextFields to show other String attributes from A.
The problem i have is , when the pdf file is generated, the last textfields appear in the middle of the content of the subreport 2, and not below it, what should be the correct situation.
Any help will be appreciated, and i apoligize if my english is not well enough. :)
Thanks in advance!
4 Answers:
Posted on September 28, 2006 at 1:57pm
First of all, thank you very much for your quick reply. ;)
Well, i tried with your solution, but it doesn't work as i expected. Now, the textfields are placed in the bottom of the page when a new instance of the JavaBean "A" is treated, but not when the subreport is complety shown. I will put a breif example of how the pdf file must be:
JavaBean "A" (attribute1: "a", attribute2: "b", attribute3:"c", attribute4: List(JavaBean B )
The pdf file should be:
"a" (first textfield)
| show JavaBean B1 |
| show JavaBean B2 |subreport
| show JavaBean Bn |
"b" "c" (textfields at the bottom)
and this schema must be repeated for each instance of "A"
With your solution, it looks like this:
"a"
| show JavaBean B1 |
"b" "c"
(end of a page)
(new page)
| show JavaBean B2 |
| show JavaBean Bn |
It's like JasperReports doesn't wait for the subreport for showing the last textfields. I don't know if i you understand what i mean :)
I still looking for a solution...and again, thanks in advance for all possible ideas that can help me
Post edited by: Doyle_Lonnegan, at: 2006/09/28 14:08
Well, i tried with your solution, but it doesn't work as i expected. Now, the textfields are placed in the bottom of the page when a new instance of the JavaBean "A" is treated, but not when the subreport is complety shown. I will put a breif example of how the pdf file must be:
JavaBean "A" (attribute1: "a", attribute2: "b", attribute3:"c", attribute4: List(JavaBean B )
The pdf file should be:
"a" (first textfield)
| show JavaBean B1 |
| show JavaBean B2 |subreport
| show JavaBean Bn |
"b" "c" (textfields at the bottom)
and this schema must be repeated for each instance of "A"
With your solution, it looks like this:
"a"
| show JavaBean B1 |
"b" "c"
(end of a page)
(new page)
| show JavaBean B2 |
| show JavaBean Bn |
It's like JasperReports doesn't wait for the subreport for showing the last textfields. I don't know if i you understand what i mean :)
I still looking for a solution...and again, thanks in advance for all possible ideas that can help me
Post edited by: Doyle_Lonnegan, at: 2006/09/28 14:08
Posted on September 29, 2006 at 10:42am
Thanks again for your reply, Lucianc
I've found a solution for my problem, it's not a very "elegant" solution :P, but i can create the pdf file that i expect.
The solution is next:
- In the first subreport, i pass the attributes of the JavaBean "A" as parameters to the second subreport, and in that subreport, i put that parameters in the LastPageFooter band. And that's all!
Anyway, thanks a lot for your replies! ;)
I've found a solution for my problem, it's not a very "elegant" solution :P, but i can create the pdf file that i expect.
The solution is next:
- In the first subreport, i pass the attributes of the JavaBean "A" as parameters to the second subreport, and in that subreport, i put that parameters in the LastPageFooter band. And that's all!
Anyway, thanks a lot for your replies! ;)