Jasper Report HTML bullet hanging indent

I have a Jasper report that uses an HTML markup tag to display a list of li tags. However, it seems that even with the latest version of the Jasper report, it still cannot indent the dangers correctly.

This is what I want:

  • TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST
    • test test test test test test test test test test test test test test test test test test test test test test test test test test test test test

This is what I get:

* TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST

/ p>

I have this in jrxml:

<detail> <band height="20" isSplitAllowed="true" > <textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement mode="Transparent" x="32" y="2" width="458" height="16" forecolor="#000000" backcolor="#FFFFFF" key="textField" stretchType="RelativeToTallestObject" isPrintWhenDetailOverflows="true"/> <box></box> <textElement markup="html" lineSpacing="Single"> <font fontName="Arial" pdfFontName="Helvetica" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="Cp1252" isStrikeThrough="false" /> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{message}]]></textFieldExpression> </textField> </band> </detail> 

I have this in a message variable:

 <ul><li>TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST<ul><li>test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test </li></ul></li></ul> 

Any idea how I can have these bullets having padding indentation?

Thanks Michael

+1
source share
2 answers

I was able to achieve this by combining the negative tab tabs on the first line (text box page) with equal left padding (borders page)

enter image description here

+1
source

This is possible when filling the element:

Padding Dialog iReport

  <textField isBlankWhenNull="true"> <reportElement x="170" y="10" width="400" height="15"/> <box leftPadding="5"> <topPen lineWidth="0.0"/> <leftPen lineWidth="0.0"/> </box> <textElement> <font fontName="Times New Roman" size="10" pdfEncoding="Cp1250"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{TASK_NAME}]]></textFieldExpression> </textField> 
0
source

Source: https://habr.com/ru/post/977189/


All Articles