2016-04-19 46 views
2

我有一個參數輸入到文本字段與HTML標記語言或風格。但是,當我把標籤,它根本不顯示。HTML標記表到文本字段 - JasperReport

的JasperSoft支持THID標籤:

<b/>, <u/>, <i/>, <font/>,<sup/>, <sub/>, <li/>, <br/> 

有沒有辦法從那個HTML標記顯示錶?如果不行,是否有其他解決方案?

回答

3

沒有的方式來顯示html表內的textField

HTML屬性只能用於字符的外觀到 產生佈局

你唯一的選擇就是使用碧玉報告HtmlComponent<hc:html/>

例子e

<componentElement> 
    <reportElement x="0" y="100" width="230" height="110" backcolor="#ADD8E6" uuid="332dd551-e8cd-4cb0-a11f-7325f481017b"/> 
    <hc:html xmlns:hc="http://jasperreports.sourceforge.net/htmlcomponent" xsi:schemaLocation="http://jasperreports.sourceforge.net/htmlcomponent http://jasperreports.sourceforge.net/xsd/htmlcomponent.xsd" scaleType="FillFrame" horizontalAlign="Left" verticalAlign="Top"> 
     <hc:htmlContentExpression><![CDATA["<table><tr><td>Hello</td></tr><tr><td>World</td></tr></table>]]></hc:htmlContentExpression> 
    </hc:html> 
</componentElement> 

這個組件的主要問題是它創建了一個你的html的圖像,你將有問題縮放文本。