Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to call subreport ?

 
Thiru kumaran M
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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. ?













table_format.JPG
[Thumbnail for table_format.JPG]
format to be printed in PDF...
 
Michael Houlo
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ^^)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic