本文介绍了Jasper报告HTML子弹悬挂缩进的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我有一个Jasper报告,它使用HTML标记标记来显示li标签列表。但是,即使使用最新版本的Jasper报告,它仍然无法正确执行悬挂缩进。 这就是我想要的: 测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试 测试测试测试测试测试测试测试测试测试测试试验试验试验试验试验试验试验试验试验试验试验试验试验试验试验试验我得到: * 测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试 * 测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试 我在jrxml中有这个: <细节> < band height =20isSplitAllowed =true> < textField isStretchWithOverflow =truepattern =isBlankWhenNull =trueevaluationTime =NowhyperlinkType =NonehyperlinkTarget =Self> < reportElement mode =透明x =32y =2 width =458 height =16 forecolor =#000000 backcolor =#FFFFFF key =textField stretchType =RelativeToTallestObject isPrintWhenDetailOverflows =true/> < box>< / box> < textElement markup =htmllineSpacing =Single> < font fontName =ArialpdfFontName =HelveticaisBold =falseisItalic =falseisUnderline =falseisPdfEmbedded =falsepdfEncoding =Cp1252isStrikeThrough =false/> < / textElement> < textFieldExpression class =java.lang.String><![CDATA [$ F {message}]]>< / textFieldExpression> < / textField> < / band> < / detail> 我在消息变量中有这个: 我知道如何让那些子弹悬挂缩进? 谢谢你, Michael 解决方案我能够通过结合负片标签缩进来实现这一点在第一行(文本字段页面),左边填充相等(边框页面) I have a Jasper report which uses HTML markup tag to display the li tag list. However, it seems that even with the latest version of the Jasper report, it still cannot do the hanging indent 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 TESTtest 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 testThis 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 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 testI have this in the 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 the 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 those bullets having hanging indented?Thank you,Michael 解决方案 I was able to achieve this by combining negative tab indent on the first line (text field page) with an equal left padding (borders page) 这篇关于Jasper报告HTML子弹悬挂缩进的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-16 04:57