2012-06-14 16 views
1

我有一個Jasper報告,它使用HTML標記標籤來顯示li標籤列表。但是,即使使用最新版本的Jasper報告,它仍然無法正確執行垂直縮進。賈斯珀報告HTML項目符號掛痕

這就是我想要的:

  • 測試測試測試測試測試測試測試測試測試測試測試測試測試測試測試測試測試測試測試測試
    • 測試測試測試測試測試測試測試測試測試測試測試測試測試測試測試測試測試測試測試測試測試測試測試測試測試測試測試測試測試測試測試

這就是我得到:

*  測試測試測試測試TES t檢驗測試測試測試測試測試測試測試測試測試測試測試測試測試測試

      *  試驗試驗試驗試驗試驗試驗試驗試驗試驗試驗試驗試驗試驗試驗試驗試驗試驗試驗試驗試驗試驗試驗試驗試驗試驗試驗試驗試驗試驗試驗試驗試驗試驗試驗試驗試驗試驗

我有這在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> 

我有這樣的消息變量:

<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> 

任何想法如何我可以讓這些子彈懸掛縮進?

謝謝 邁克爾

+0

您是否找到解決方案? – Abs

回答

0

這是可能與元素的填充:

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> 
1

我能夠在第一線相結合的負面標籤縮進來實現這一(文本字段頁面)與等號左填充(邊框頁面)

enter image description here

+0

輝煌的解決方案!這對我有效。 –