How to make the HTML (component) of jaspers auto - height..?

Viewed 2390

I have a code in jrxml like.

 <detail>
        <band height="35">
            <componentElement>
                <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="38" y="12" width="457" height=<![CDATA[$P{col1_Header}]]> isRemoveLineWhenBlank="true" />
                <hc:html xmlns:hc="http://jasperreports.sourceforge.net/htmlcomponent" xsi:schemaLocation="http://jasperreports.sourceforge.net/htmlcomponent http://jasperreports.sourceforge.net/xsd/htmlcomponent.xsd" scaleType="RetainShape" horizontalAlign="Left" verticalAlign="Middle">
                    <hc:htmlContentExpression><![CDATA[com.turborep.turbotracker.util.ReportUtils.toHtml($F{InlineNote})]]></hc:htmlContentExpression>
                </hc:html>
            </componentElement>
            <rectangle>
                <reportElement isPrintRepeatedValues="false" x="292" y="2" width="65" height="20" forecolor="#FFFFFF" />
            </rectangle>
            <rectangle>
                <reportElement isPrintRepeatedValues="false" x="33" y="2" width="64" height="20" forecolor="#FFFFFF" />
            </rectangle>
            <rectangle>
                <reportElement isPrintRepeatedValues="false" x="357" y="2" width="74" height="20" forecolor="#FFFFFF" />
            </rectangle>
            <rectangle>
                <reportElement isPrintRepeatedValues="false" x="94" y="2" width="71" height="20" forecolor="#FFFFFF" />
            </rectangle>
            <textField isStretchWithOverflow="true">
                <reportElement isPrintRepeatedValues="false" x="43" y="2" width="128" height="20" />
                <textFieldExpression><![CDATA[$F{Product}]]></textFieldExpression>
            </textField>
            <textField isStretchWithOverflow="true" isBlankWhenNull="true">
                <reportElement isPrintRepeatedValues="false" x="173" y="2" width="100" height="20" isPrintWhenDetailOverflows="true" />
                <textFieldExpression><![CDATA[$F{ItemQuantity}]]></textFieldExpression>
            </textField>
            <textField isStretchWithOverflow="true" isBlankWhenNull="true">
                <reportElement isPrintRepeatedValues="false" x="273" y="3" width="134" height="20" isPrintWhenDetailOverflows="true" />
                <textFieldExpression><![CDATA[$F{Paragraph}]]></textFieldExpression>
            </textField>
            <textField isStretchWithOverflow="true" isBlankWhenNull="true">
                <reportElement isPrintRepeatedValues="false" x="407" y="3" width="103" height="20" isPrintInFirstWholeBand="true" />
                <textElement textAlignment="Right"/>
                <textFieldExpression><![CDATA[($F{Price} == null) ? "" : "$"+$F{Price}.setScale(2, java.math.RoundingMode.HALF_UP)]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="16" y="0" width="23" height="20" />
                <textElement>
                    <font isBold="true" pdfFontName="Helvetica-Bold"/>
                </textElement>
                <textFieldExpression><![CDATA[$V{REPORT_COUNT}+"."]]></textFieldExpression>
            </textField>
        </band>
    </detail>

enter image description here enter image description here

where my html content will grow bigger, so i want the html component to have auto height or it should support overflow. Now it is shrinking the size of the components as it grows.

Please help me with this. Thanks in advance.

0 Answers
Related