Jasper 报告语法 报告元素和框架
我试图了解 jasper 报告是如何工作的,但我发现语法有点难以掌握。
reportelement-key 到底指的是什么?框架也是一个纯粹的视觉组件吗?
<frame>
<reportElement key="frame-6" mode="Opaque" x="0" y="36" width="534" height="36" backcolor="#CCCCCC"/>
<box>
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.0" lineColor="#000000"/>
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
</frame>
另外,下面的 F 和 v 表示什么,更重要的是它们在哪里定义?
<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{amountTotal}]]></textFieldExpression>
<variableExpression><![CDATA[new BigDecimal($F{amount percentage})</variableExpression>
I'm trying to understand how jasper reports work but i find the syntax a little difficult to get to grips with.
what exactly does reportelement- key refer to? also is frame a purely visual component?
<frame>
<reportElement key="frame-6" mode="Opaque" x="0" y="36" width="534" height="36" backcolor="#CCCCCC"/>
<box>
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.0" lineColor="#000000"/>
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
</frame>
Also in the following what do the F and v indicate, and more importantly where are they defined?
<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{amountTotal}]]></textFieldExpression>
<variableExpression><![CDATA[new BigDecimal($F{amount percentage})</variableExpression>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
关于框架:
引自IReport Ultimate Guide:
关于reportElement
引用自JasperReports Ultimate Guide:
关于字段 ($F) 和变量 ($V):
$F{fieldName}
是对名称为fieldName
的字段的引用。这些字段包含来自数据源
的数据。$V{variableName}
是对名称为variableName
的报表变量的引用。变量具有表达式,可用于不同的计算。About the frame:
The quotes from IReport Ultimate Guide:
About the reportElement
The quotes from JasperReports Ultimate Guide:
About the fields ($F) and variables ($V):
$F{fieldName}
is a reference to the field with namefieldName
. The fields contains data from adata source
.$V{variableName}
is a reference to the report's variable with namevariableName
. The variable have expression and can be used for different calculations.