Home
Analytics
How Do I Insert SubReports in a Main Report
KSReynolds
<p>I am new to Jasper AND Birt. I have a Jasper report that I am trying to re-create in Birt, and in the Jasper report in the TITLE there is a sub-report. I have gone to Report Design, Palette, but do not see an option for putting a subreport in my title. Thank you.</p>
Find more posts tagged with
Comments
Clement Wong
<p><span style="font-size:12px;"><span style="font-family:arial, helvetica, sans-serif;">Welcome to the world of BIRT!</span></span></p>
<p> </p>
<p><span style="font-size:12px;"><span style="font-family:arial, helvetica, sans-serif;">This tutorial shows you how to create subreports (or nested tables) in BIRT:</span></span></p>
<p><span style="font-size:12px;"><span style="font-family:arial, helvetica, sans-serif;"><a data-ipb='nomediaparse' href='
http://help.eclipse.org/juno/index.jsp?topic=/org.eclipse.birt.doc/birt/sub-SubreportsTutorialIntro.html'>http://help.eclipse.org/juno/index.jsp?topic=/org.eclipse.birt.doc/birt/sub-SubreportsTutorialIntro.html</a></span></span></p>
;
<p> </p>
<p><span style="font-size:12px;"><span style="font-family:arial, helvetica, sans-serif;">Also, there is a DevShare, illustrating this technique:</span></span></p>
<p><span style="font-size:12px;"><span style="font-family:arial, helvetica, sans-serif;"><a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/files/file/513-sample-birt-sub-report-example/'>http://developer.actuate.com/community/forum/index.php?/files/file/513-sample-birt-sub-report-example/</a></span></span></p>
;
<p> </p>
<p><span style="font-size:12px;"><span style="font-family:arial, helvetica, sans-serif;">To summarize the steps:</span></span></p>
<ol><li><span style="font-size:12px;"><span style="font-family:arial, helvetica, sans-serif;">Create the main query</span></span></li>
<li><span style="font-size:12px;"><span style="font-family:arial, helvetica, sans-serif;">Create the sub-query with a parameter (each row from main query will populate this parameter)</span></span></li>
<li><span style="font-size:12px;"><span style="font-family:arial, helvetica, sans-serif;">Create the main table</span></span></li>
<li><span style="font-size:12px;"><span style="font-family:arial, helvetica, sans-serif;">Drag the sub-query Data Set into the Detail row of the main table</span></span></li>
<li><span style="font-size:12px;"><span style="font-family:arial, helvetica, sans-serif;">Link the sub-table (or nested table) Data Set's parameter to the main row detail by changing the binding of the parameter</span></span></li>
</ol><p> </p>
<p><span style="font-size:12px;"><span style="font-family:arial, helvetica, sans-serif;">(I recently assisted another community member @ <a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/topic/36783-how-to-loop-through-data-set-values-for-a-yesterday-hourly-report/?p=137165'>http://developer.actuate.com/community/forum/index.php?/topic/36783-how-to-loop-through-data-set-values-for-a-yesterday-hourly-report/?p=137165</a>
; if you want take a look at the screenshot from Step 5, along with another example.)</span></span></p>