感謝您的答覆。
這是在文章中建議該消息
java.lang.ClassNotFoundException: java.lang.UniqueCategoryLabel
refers to the modification from
<field name="charge" class="java.lang.String" to
<field name="charge" class="java.lang.UniqueCategoryLabel"
。 我希望這對你來說已經足夠了。請讓我現在,如果你需要更多的信息。 特此報告代碼:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.1.0.final using JasperReports Library version 6.1.0 -->
<!-- 2015-08-31T11:45:11 -->
<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="ic_A4_1" pageWidth="1190" pageHeight="842" orientation="Landscape" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="fdc0bd49-2d10-4f3e-bbef-032ce95cbb2b">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="Postgres Lokal (Postgres auf localhost 5432)"/>
<property name="com.jaspersoft.studio.unit." value="pixel"/>
<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.unit.columnSpacing" value="pixel"/>
<parameter name="Materialnr" class="java.lang.Long">
<parameterDescription><![CDATA[Materialnummer eingeben]]></parameterDescription>
</parameter>
<parameter name="Feldstaerke" class="java.util.Collection">
<parameterDescription><![CDATA[Feldstärke]]></parameterDescription>
</parameter>
<parameter name="Zeitraum" class="java.lang.Long">
<parameterDescription><![CDATA[Zeitraum]]></parameterDescription>
</parameter>
<parameter name="Chargennr" class="java.util.Collection">
<parameterDescription><![CDATA[Chargennummer]]></parameterDescription>
</parameter>
<queryString>
<![CDATA[select charge, avg(ic_ist_tc) as ic,
0 as ic_charge,messdatum from tbl_physikal_eigensch
where $X{IN,charge, Chargennr} and matnr = $P{Materialnr} and $X{IN,cast(feld as text),Feldstaerke} and
messdatum > CURRENT_DATE - $P!{Zeitraum} group by ic_ist_tc, charge, messdatum]]>
</queryString>
<field name="charge" class="**java.lang.UniqueCategoryLabel**"/>
<field name="ic" class="java.lang.Double"/>
<field name="ic_charge" class="java.lang.Integer"/>
<field name="messdatum" class="java.sql.Timestamp"/>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="79" splitType="Stretch">
<textField>
<reportElement x="140" y="10" width="310" height="30" uuid="7e5a58f0-bef2-4a19-9e3d-8463fd183e97"/>
<textElement>
<font size="16" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["Test für Wolkenauswertung"]]></textFieldExpression>
</textField>
</band>
</title>
<pageHeader>
<band height="35" splitType="Stretch">
<textField>
<reportElement x="0" y="4" width="141" height="30" uuid="1cdaa2f5-9de1-4a49-b64a-18e9c797523f"/>
<textFieldExpression><![CDATA[$P{Materialnr}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="141" y="4" width="138" height="30" uuid="cfdcf595-23fb-463a-b785-686328dcba27"/>
<textFieldExpression><![CDATA[$P{Feldstaerke}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="279" y="4" width="138" height="30" uuid="7b14cbf7-61ec-4cff-90b0-03020753dc48"/>
<textFieldExpression><![CDATA[$P{Zeitraum}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="417" y="4" width="138" height="30" uuid="2b8b6fc8-c6a3-46d4-988d-8c7852e63c65"/>
<textFieldExpression><![CDATA[$P{Chargennr}]]></textFieldExpression>
</textField>
</band>
</pageHeader>
<columnHeader>
<band height="39" splitType="Stretch"/>
</columnHeader>
<detail>
<band height="44" splitType="Stretch">
<printWhenExpression><![CDATA[$F{charge} != null]]></printWhenExpression>
<textField>
<reportElement x="0" y="0" width="141" height="30" uuid="b3c2fa4f-15c4-470f-91e1-38647e4a9d5c"/>
<textFieldExpression><![CDATA[$F{charge}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="141" y="0" width="138" height="30" uuid="21d7eb63-4854-4be7-af38-42b7339dceaf"/>
<textFieldExpression><![CDATA[$F{ic}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="279" y="0" width="138" height="30" uuid="e2b21f1c-d6c5-4063-83d1-02ea6781e116"/>
<textFieldExpression><![CDATA[$F{ic_charge}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="417" y="0" width="138" height="30" uuid="55d01538-9498-4bf8-a5ee-f354d4def1c4"/>
<textFieldExpression><![CDATA[$F{messdatum}]]></textFieldExpression>
</textField>
</band>
</detail>
<columnFooter>
<band height="45" splitType="Stretch"/>
</columnFooter>
<pageFooter>
<band height="54" splitType="Stretch"/>
</pageFooter>
<summary>
<band height="801" splitType="Stretch">
<property name="com.jaspersoft.studio.unit.height" value="pixel"/>
<lineChart>
<chart evaluationTime="Report">
<reportElement stretchType="RelativeToTallestObject" isPrintRepeatedValues="false" x="0" y="0" width="500" height="350" isPrintInFirstWholeBand="true" isPrintWhenDetailOverflows="true" uuid="1ab5eddf-90e6-4356-b819-687ea0c6c514"/>
<chartTitle>
<titleExpression><![CDATA[$P{Materialnr}]]></titleExpression>
</chartTitle>
<chartSubtitle/>
<chartLegend position="Bottom">
<font size="8"/>
</chartLegend>
</chart>
<categoryDataset>
<dataset resetType="None" incrementType="Report"/>
<categorySeries>
<seriesExpression><![CDATA["CHARGE"]]></seriesExpression>
<categoryExpression><![CDATA[$F{charge}]]></categoryExpression>
<valueExpression><![CDATA[$F{ic}]]></valueExpression>
</categorySeries>
<categorySeries>
<seriesExpression><![CDATA["CHARGE2"]]></seriesExpression>
<categoryExpression><![CDATA[$F{charge}]]></categoryExpression>
<valueExpression><![CDATA[$F{ic}]]></valueExpression>
</categorySeries>
</categoryDataset>
<linePlot>
<plot backgroundAlpha="1.0" foregroundAlpha="1.0" labelRotation="-90.0">
<seriesColor seriesOrder="0" color="#EB2902"/>
<seriesColor seriesOrder="1" color="#38C83B"/>
</plot>
<categoryAxisFormat labelRotation="-90.0">
<axisFormat tickLabelColor="#0A0A0A" verticalTickLabels="false">
<labelFont>
<font size="2"/>
</labelFont>
<tickLabelFont>
<font size="8"/>
</tickLabelFont>
</axisFormat>
</categoryAxisFormat>
<valueAxisFormat>
<axisFormat>
<labelFont>
<font size="8"/>
</labelFont>
<tickLabelFont>
<font size="8"/>
</tickLabelFont>
</axisFormat>
</valueAxisFormat>
</linePlot>
</lineChart>
</band>
</summary>
</jasperReport>
您能顯示代碼嗎? –