This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Other Open Source Projects and the fly likes How to call subreport ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "How to call subreport ?" Watch "How to call subreport ?" New topic

How to call subreport ?

Thiru kumaran M

Joined: Mar 17, 2010
Posts: 3
Hi guys... I am new to i-Report.

I need to display two set of data in table format in a PDF through i-Report. I am using i-Report 2.0.4. I tried with sub report. But i am struggling with sub report. How to pass the parameter to sub report from main report? There is no need for me to pass the parameter dynamically ( via parameter prompting while execution of designed PDF. I have attached the format i have to display in PDF.

Can you suggest me the idea for displaying the PDF in that format?

Also, please say, how to use sub report for printing in this format ?

I have compiled and executed the sub report. Sub report is generated when it is executed separately.
When am trying to execute the main report, only the main report content is printed. the sub report content is not printed in main report.

can any one help me out of this problem. ?

[Thumbnail for table_format.JPG]

Michael Houlo
Ranch Hand

Joined: Jun 07, 2010
Posts: 58
You have to create a Parameter in your subreport and insert that parameter in your SQL clause. ( WHERE $P{MyParameterName} = MyChan ).
Then in your main report, you create a new SubData field and select your subreport.. You have to insert a param with the same name as your subreport's one.

I hope it helps. (i'm new to i-report & jasper too, but it worked for me ^^)
I agree. Here's the link:
subject: How to call subreport ?
It's not a secret anymore!