我使用oracle查询设计了HTML图表,该查询传递单值参数,运行良好。我使用的方法是将HTML图表
放在summary带
中,并将evalution time
设置为now
。
现在,我想使用多值参数显示相同的HTML图表
。我想在每个pdf页面中显示每个项目的图表元素。因此,从逻辑上讲,我需要将HTML图表
放置在Detail Band
,而不是Summary Band
。但现在它不工作,并抛出错误“增量二维数据集”
Jaspersoft studio版本:5.6.1最终版
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="Charts" pageWidth="200" pageHeight="275" orientation="Landscape" columnWidth="200" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="c6523df6-0c5f-4728-87c2-57825f88fca3">
<property name="com.jaspersoft.studio.unit." value="inch" />
<property name="com.jaspersoft.studio.unit.pageHeight" value="pixel" />
<property name="com.jaspersoft.studio.unit.pageWidth" value="pixel" />
<property name="com.jaspersoft.studio.unit.topMargin" value="pixel" />
<property name="com.jaspersoft.studio.unit.bottomMargin" value="pixel" />
<property name="com.jaspersoft.studio.unit.leftMargin" value="pixel" />
<property name="com.jaspersoft.studio.unit.rightMargin" value="pixel" />
<property name="com.jaspersoft.studio.unit.columnWidth" value="pixel" />
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="Dev DB Conn" />
<parameter name="param_month" class="java.lang.String" />
<parameter name="param_year" class="java.lang.String" />
<parameter name="param_project" class="java.util.Collection" />
<queryString language="SQL">
<![CDATA[SELECT
i.id prid,c.INUSAGE,d.CURRUSAGE
FROM
project table i, custom table c
where i.id = c.id and $X{IN,I.id,param_project}
]]>
</queryString>
<field name="prid" class="java.math.BigDecimal" />
<field name="INUSAGE" class="java.math.BigDecimal" />
<field name="CURRUSAGE" class="java.math.BigDecimal" />
<summary>
<band height="223">
<componentElement>
<reportElement positionType="Float" isPrintRepeatedValues="false" x="0" y="3" width="190" height="220" uuid="0a0e6b98-2d59-453a-8642-3a65d4b30bb1">
<property name="local_mesure_unitwidth" value="inch" />
</reportElement>
<hc:chart xmlns:hc="http://jaspersoft.com/highcharts" xsi:schemaLocation="http://jaspersoft.com/highcharts http://jaspersoft.com/schema/highcharts.xsd" type="Column" evaluationGroup="">
<hc:chartSetting name="default">
<hc:chartProperty name="_showDataPoints">
<hc:propertyExpression>
<![CDATA[Boolean.FALSE]]>
</hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="_showMeasureNameOnValueAxis">
<hc:propertyExpression>
<![CDATA[Boolean.FALSE]]>
</hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="chart.alignTicks">
<hc:propertyExpression>
<![CDATA[Boolean.FALSE]]>
</hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="chart.animation">
<hc:propertyExpression>
<![CDATA[Boolean.TRUE]]>
</hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="chart.borderRadius">
<hc:propertyExpression>
<![CDATA[new Integer(0)]]>
</hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="chart.borderWidth">
<hc:propertyExpression>
<![CDATA[new Integer(0)]]>
</hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="chart.ignoreHiddenSeries">
<hc:propertyExpression>
<![CDATA[Boolean.FALSE]]>
</hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="chart.selectionMarkerFill">
<hc:propertyExpression>
<![CDATA[new java.awt.Color(-1)]]>
</hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="chart.shadow">
<hc:propertyExpression>
<![CDATA[Boolean.FALSE]]>
</hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="chart.spacingBottom">
<hc:propertyExpression>
<![CDATA[new Integer(20)]]>
</hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="chart.zoomType">
<hc:propertyExpression>
<![CDATA["none"]]>
</hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="colors">
<hc:propertyExpression>
<![CDATA[java.util.Arrays.asList("#779499","#C0D9DE","#8bbc21","#910000","#1aadce","#492970","#f28f43","#77a1e5","#c42525","#a6c96a","#C0D9DE")]]>
</hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="credits.enabled">
<hc:propertyExpression>
<![CDATA[false]]>
</hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="credits.href">
<hc:propertyExpression>
<![CDATA[""]]>
</hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="credits.text">
<hc:propertyExpression>
<![CDATA[""]]>
</hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="legend.align">
<hc:propertyExpression>
<![CDATA["center"]]>
</hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="legend.borderRadius">
<hc:propertyExpression>
<![CDATA[new Integer(5)]]>
</hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="legend.enabled">
<hc:propertyExpression>
<![CDATA[Boolean.TRUE]]>
</hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="legend.floating">
<hc:propertyExpression>
<![CDATA[Boolean.FALSE]]>
</hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="legend.layout">
<hc:propertyExpression>
<![CDATA["horizontal"]]>
</hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="legend.lineHeight">
<hc:propertyExpression>
<![CDATA[new Integer(30)]]>
</hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="legend.margin">
<hc:propertyExpression>
<![CDATA[new Integer(15)]]>
</hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="legend.padding">
<hc:propertyExpression>
<![CDATA[new Integer(8)]]>
</hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="legend.symbolPadding">
<hc:propertyExpression>
<![CDATA[new Integer(5)]]>
</hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="legend.symbolWidth">
<hc:propertyExpression>
<![CDATA[new Integer(30)]]>
</hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="legend.verticalAlign">
<hc:propertyExpression>
<![CDATA["bottom"]]>
</hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="legend.x">
<hc:propertyExpression>
<![CDATA[new Integer(10)]]>
</hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="legend.y">
<hc:propertyExpression>
<![CDATA[new Integer(10)]]>
</hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="legened.itemStyle.fontSize" value="4" />
<hc:chartProperty name="plotOptions.series.animation">
<hc:propertyExpression>
<![CDATA[Boolean.TRUE]]>
</hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="plotOptions.series.dataLabels.enabled" value="true" />
<hc:chartProperty name="plotOptions.series.dataLabels.format" value="{point.y:,.0f}" />
<hc:chartProperty name="plotOptions.series.lineWidth">
<hc:propertyExpression>
<![CDATA[new Integer(2)]]>
</hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="plotOptions.series.shadow">
<hc:propertyExpression>
<![CDATA[Boolean.TRUE]]>
</hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="plotOptions.series.showInLegend">
<hc:propertyExpression>
<![CDATA[Boolean.TRUE]]>
</hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="plotOptions.series.visible">
<hc:propertyExpression>
<![CDATA[Boolean.TRUE]]>
</hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="title.align">
<hc:propertyExpression>
<![CDATA["left"]]>
</hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="title.style.color">
<hc:propertyExpression>
<![CDATA[new java.awt.Color(-4138530)]]>
</hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="title.text">
<hc:propertyExpression>
<![CDATA[""]]>
</hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="title.verticalAlign">
<hc:propertyExpression>
<![CDATA["top"]]>
</hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="tooltip.animation">
<hc:propertyExpression>
<![CDATA[Boolean.TRUE]]>
</hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="tooltip.enabled">
<hc:propertyExpression>
<![CDATA[Boolean.TRUE]]>
</hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="tooltip.shadow">
<hc:propertyExpression>
<![CDATA[Boolean.TRUE]]>
</hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="xAxis.labels.step">
<hc:propertyExpression>
<![CDATA[new Integer(0)]]>
</hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="yAxis.gridLineColor" value="'#FFFFFF'" />
<hc:chartProperty name="plotOptions.column.marker.enabled">
<hc:propertyExpression>
<![CDATA[Boolean.FALSE]]>
</hc:propertyExpression>
</hc:chartProperty>
<hc:chartProperty name="yAxis.title.text" value="" />
</hc:chartSetting>
<multiAxisData>
<multiAxisDataset />
<dataAxis axis="Rows">
<axisLevel name="InvName">
<labelExpression>
<![CDATA[]]>
</labelExpression>
<axisLevelBucket class="java.lang.String">
<bucketExpression>
<![CDATA[]]>
</bucketExpression>
</axisLevelBucket>
</axisLevel>
</dataAxis>
<dataAxis axis="Columns" />
<multiAxisMeasure name="Initial Baseline" class="java.lang.Integer" calculation="Highest">
<labelExpression>
<![CDATA["Initial Baseline"]]>
</labelExpression>
<valueExpression>
<![CDATA[$F{INUSAGE}]]>
</valueExpression>
</multiAxisMeasure>
<multiAxisMeasure name="Current Baseline" class="java.lang.Integer" calculation="Highest">
<labelExpression>
<![CDATA["Current Baseline"]]>
</labelExpression>
<valueExpression>
<![CDATA[$F{CURRUSAGE}]]>
</valueExpression>
</multiAxisMeasure>
</multiAxisData>
<hc:series name="Current Baseline" />
<hc:series name="Initial Baseline" />
</hc:chart>
</componentElement>
</band>
</summary>
谢谢
我解决了这个问题。迭代是由于查询问题。为了解决图表问题,我将图表放在组标题中,然后将评估时间改为列,然后将图表中的重置类型改为页。现在我可以在每一页中获得每个项目的图表。希望以后能帮到别人。干杯
这是我正在尝试的代码 为了将脚本中的参数一个接一个地发送到文本字段中,我要做什么?有可能吗?
问题内容: 当我尝试从报表参数传递多个值时,BIRT存在问题。 我正在使用BIRT 2.6.2和Eclipse。 我正在尝试从级联参数组的最后一个参数“ JDSuser”中放入多个值。该参数允许具有多个值,并且我正在使用列表框。 为了能够做到这一点,我正在用where-in语句编写我的sql查询,其中我用javascript替换了文本。否则BIRT sql无法从report参数获取多个值。 我的S
问题内容: 我读了与该错误有关的其他线程,似乎我的问题与到目前为止所读的所有帖子都存在有趣的明显区别,即,到目前为止,所有其他帖子在创建一个用户方面都存在错误类或内置系统资源。调用函数时遇到此问题,我无法弄清楚它的用途。有任何想法吗? 错误信息: 问题答案: 当指定关键字参数覆盖位置参数时,会发生这种情况。例如,让我们想象一个绘制彩色框的函数。该函数选择要使用的颜色,并将框的图形委托给另一个函数,
问题内容: 如何获得HTML表单的值以传递给JavaScript? 它是否正确?我的脚本有两个参数,一个来自文本框,一个来自下拉框。 问题答案: HTML: JS:
我有一个drools决策表,其中包含条件和位置类型 我的excel如下所示 设置参数的代码如下 我按要求提供的excel文件条件对象: 需求级别==$参数位置类型==$参数 当我像上面那样设置时,我得到以下错误: 创建KieBase时出错[消息[id=1,级别=错误,路径=规则.xls,行=8,列=0文本=[错误102]行8:14不匹配的输入'=='在规则“替换规则”中],消息[id=2,级别=错
我看过很多关于如何在chart.js中添加数据的教程,但都是针对单个图表的。 我使用chartjs创建多个图表(每个图表都有自己的画布和唯一的ID)。例如:图表1位于id=“c1”的画布中,图表2位于id=“c2”的画布中。如何选择图表1并添加新数据?