Jaspersoft Community 'Read-Only' as of July 8, 2022
Transition to New TIBCO Community Just Weeks Away
You can still search, review wiki content, and review discussions in read-only mode. Please email community@tibco.com with questions or issues requiring TIBCO review or response.
My reports is working. But at the moment I add a chart.. I always receive following error:
Null 'key' argument
This is since I upgraded frop iReport to Jaspersoft Studio!
full error message:
4 Answers:
I'm trying the tutorial at http://community.jaspersoft.com/wiki/creating-charts-and-subreports-jasp... and am getting the same error.
This is using JasperReports 6.2 andjasper studio 6.2.
The graph in that tutorial is also a bar chart.
Are there any tricks for debugging this stuff? Java stack traces into code you don't have sources to (org.jfree in this case) and exception messages like "null 'key' argument" are pretty useless.
Here's the jrxml generated from the example:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.2.0.final using JasperReports Library version 6.2.0 -->
<!-- 2016-01-28T16:16:22 -->
<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="GraphReport" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="c029557d-c3bc-47e9-a5ff-f7544e7265cb">
<property name="com.jaspersoft.studio.data.sql.tables" value=""/>
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="Sample DB"/>
<queryString>
<![CDATA[select count(*), SHIPCITY from orders group by SHIPCITY]]>
</queryString>
<field name="C1" class="java.lang.Long"/>
<field name="SHIPCITY" class="java.lang.String"/>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="350" splitType="Stretch">
<property name="com.jaspersoft.studio.unit.height" value="pixel"/>
<barChart>
<chart evaluationTime="Report">
<reportElement x="0" y="0" width="555" height="350" uuid="eb78ea14-af53-4212-90f4-0186ec9effcf"/>
<chartTitle/>
<chartSubtitle/>
<chartLegend/>
</chart>
<categoryDataset>
<categorySeries>
<seriesExpression><![CDATA[$F{SHIPCITY}]]></seriesExpression>
<valueExpression><![CDATA[$F{C1}]]></valueExpression>
<labelExpression><![CDATA[$F{SHIPCITY}]]></labelExpression>
</categorySeries>
</categoryDataset>
<barPlot>
<plot/>
<itemLabel/>
<categoryAxisLabelExpression><![CDATA[" "]]></categoryAxisLabelExpression>
<categoryAxisFormat>
<axisFormat/>
</categoryAxisFormat>
<valueAxisFormat>
<axisFormat/>
</valueAxisFormat>
</barPlot>
</barChart>
</band>
</title>
</jasperReport>