我正在尝试在jasper报告中创建一个新的jrtx文件
当尝试保存* .jrtx文件时,出现类似
的错误
'必须为元素类型“样式”声明“保存失败的属性” hTextAlign”。
示例代码如下
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jasperTemplate PUBLIC "-//JasperReports//DTD Template//EN" "http://jasperreports.sourceforge.net/dtds/jaspertemplate.dtd">
<jasperTemplate>
<style name="ColumnHeader" mode="Opaque" forecolor="#FFFFFF" backcolor="#34BD8F" hTextAlign="Center" hImageAlign="Center" vTextAlign="Middle" vImageAlign="Middle" pattern="" fontName="lato" fontSize="12">
<box leftPadding="0">
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#028B5B"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#028B5B"/>
<bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#028B5B"/>
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#028B5B"/>
</box>
</style>
<style name="RowTextStyle" vTextAlign="Middle" vImageAlign="Middle" fontName="Lato" fontSize="12">
<box leftPadding="10">
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#FFFFFF"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#FFFFFF"/>
<bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#FFFFFF"/>
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#FFFFFF"/>
</box>
</style>
<style name="RowNumberStyle" hTextAlign="Right" hImageAlign="Right" vTextAlign="Middle" vImageAlign="Middle" fontName="Lato" fontSize="12">
<box rightPadding="10">
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#FFFFFF"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#FFFFFF"/>
<bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#FFFFFF"/>
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#FFFFFF"/>
</box>
</style>
<style name="RowDateStyle" hTextAlign="Center" hImageAlign="Center" vTextAlign="Middle" vImageAlign="Middle" pattern="M/d/yy" fontName="Lato" fontSize="12">
<box>
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#FFFFFF"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#FFFFFF"/>
<bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#FFFFFF"/>
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#FFFFFF"/>
</box>
</style>
<style name="Report Title Style" backcolor="#FFFFFF" hTextAlign="Left" hImageAlign="Left" fontName="Montserrat" fontSize="18">
<box>
<topPen lineColor="#FFFFFF"/>
<leftPen lineColor="#FFFFFF"/>
<bottomPen lineColor="#FFFFFF"/>
<rightPen lineColor="#FFFFFF"/>
</box>
</style>
<style name="Style" hImageAlign="Center" vImageAlign="Middle"/>
</jasperTemplate>
任何有关此的想法都会很有帮助
谢谢