Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you are using jasper report plugin, you can open the JRXML file and say something like</p> <pre><code> &lt;box&gt; &lt;topPen lineWidth="1.0"/&gt; &lt;leftPen lineWidth="1.0"/&gt; &lt;bottomPen lineWidth="1.0"/&gt; &lt;rightPen lineWidth="1.0"/&gt; &lt;/box&gt; </code></pre> <p>Jasper reports come with an excellent designer called '<code>IReport Designer</code>'. You can use concept of <code>frames</code> in IReport designer and put your sub-report inside the frame and then apply the border properties on the frame itself. You can also find <a href="https://stackoverflow.com/questions/10278067/adding-table-border-in-jasperreports">BorderAroundTable</a> useful. I would definitely recommend these links as well.</p> <p><a href="http://community.jaspersoft.com/questions/525140/how-add-borders-subreport" rel="nofollow noreferrer">How to add border to a subreport</a></p> <p><a href="http://community.jaspersoft.com/questions/514951/frame-around-two-subreports" rel="nofollow noreferrer">Frame Around Two Subreports</a></p> <p><a href="https://stackoverflow.com/questions/2069631/border-in-jasper-report">Border In Jasper Report</a></p> <p>Let us know if this solution works for you.</p> <p>If it can work for subreport having summary and page header, then it can help your case as well.</p> <p><strong>Editing and adding master report and subreport code having border</strong></p> <p><strong>Master Report Source Code</strong></p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="testborder" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20"&gt; &lt;property name="ireport.zoom" value="1.0"/&gt; &lt;property name="ireport.x" value="0"/&gt; &lt;property name="ireport.y" value="0"/&gt; &lt;background&gt; &lt;band splitType="Stretch"/&gt; &lt;/background&gt; &lt;detail&gt; &lt;band height="421" splitType="Stretch"&gt; &lt;subreport&gt; &lt;reportElement x="25" y="148" width="200" height="100"/&gt; &lt;dataSourceExpression&gt;&lt;![CDATA[new net.sf.jasperreports.engine.JREmptyDataSource()]]&gt;&lt;/dataSourceExpression&gt; &lt;subreportExpression&gt;&lt;![CDATA["C:\\jaspersamples\\testborder_subreport1.jasper"]]&gt;&lt;/subreportExpression&gt; &lt;/subreport&gt; &lt;frame&gt; &lt;reportElement x="45" y="119" width="390" height="176"/&gt; &lt;box&gt; &lt;topPen lineWidth="2.0" lineStyle="Solid"/&gt; &lt;leftPen lineWidth="2.0" lineStyle="Solid"/&gt; &lt;bottomPen lineWidth="2.0" lineStyle="Solid"/&gt; &lt;rightPen lineWidth="2.0" lineStyle="Solid"/&gt; &lt;/box&gt; &lt;/frame&gt; &lt;/band&gt; &lt;/detail&gt; &lt;/jasperReport&gt; </code></pre> <p><strong>Subreport source code</strong></p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="testborder_subreport1" language="groovy" pageWidth="802" pageHeight="555" orientation="Landscape" whenNoDataType="AllSectionsNoDetail" columnWidth="802" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0"&gt; &lt;property name="ireport.zoom" value="1.0"/&gt; &lt;property name="ireport.x" value="0"/&gt; &lt;property name="ireport.y" value="0"/&gt; &lt;background&gt; &lt;band splitType="Stretch"/&gt; &lt;/background&gt; &lt;pageHeader&gt; &lt;band height="29" splitType="Stretch"&gt; &lt;staticText&gt; &lt;reportElement x="317" y="5" width="100" height="20"/&gt; &lt;textElement/&gt; &lt;text&gt;&lt;![CDATA[HELLO TEST]]&gt;&lt;/text&gt; &lt;/staticText&gt; &lt;/band&gt; &lt;/pageHeader&gt; &lt;summary&gt; &lt;band height="29" splitType="Stretch"&gt; &lt;staticText&gt; &lt;reportElement x="317" y="0" width="100" height="20"/&gt; &lt;textElement/&gt; &lt;text&gt;&lt;![CDATA[i am testing BORDER]]&gt;&lt;/text&gt; &lt;/staticText&gt; &lt;/band&gt; &lt;/summary&gt; &lt;/jasperReport&gt; </code></pre> <p>The output is somewhat like this</p> <p><img src="https://i.stack.imgur.com/jdbYk.jpg" alt="enter image description here"></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload