Я использую Spring и iReport для генерации отчетов о яшме в формате excel. Все работает нормально, но у меня есть одна проблема, что цвет фона моих отчетов в iReport серый, но я получаю пурпурный оттенок в моем созданном excel.Проблема цвета в отчете яшмы
Я настраиваю Create Custom Palette на true, но это не оказывает никакого эффекта.
Пожалуйста, помогите.
Мои Jrxml:
<?xml version="1.0" encoding="UTF-8"?>
<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="Charges Applicable" pageWidth="792" pageHeight="612" orientation="Landscape" whenNoDataType="AllSectionsNoDetail" columnWidth="752" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" whenResourceMissingType="Empty" uuid="6a4c70d6-2ff4-452e-a9ef-ae69eff4637f">
<property name="ireport.zoom" value="1.0"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<property name="net.sf.jasperreports.export.xls.white.page.background" value="false" />
<style name="Crosstab Data Text" hAlign="Center"/>
<subDataset name="Table Dataset 1" uuid="424400e1-c5c9-48cb-803c-85cba363151b">
<parameter name="ContractId" class="java.lang.String">
<defaultValueExpression><![CDATA[]]></defaultValueExpression>
</parameter>
<parameter name="VersionNo" class="java.lang.String">
<defaultValueExpression><![CDATA[]]></defaultValueExpression>
</parameter>
<queryString>
<![CDATA[SELECT S.TERM_PERIOD,S.TERM_CHARGES,
S.TERM_CURRENCY_ID,S.TERM_COMMENTS
FROM FCM_TX_TERMINATION_CHARGE_T S
WHERE S.CONTRACT_ID=$P{ContractId}
AND S.VERSION_NO=$P{VersionNo}]]>
</queryString>
<field name="TERM_PERIOD" class="java.lang.String"/>
<field name="TERM_CHARGES" class="java.math.BigDecimal"/>
<field name="TERM_CURRENCY_ID" class="java.lang.String"/>
<field name="TERM_COMMENTS" class="java.lang.String"/>
</subDataset>
<parameter name="ContractId" class="java.lang.String">
<defaultValueExpression><![CDATA[]]></defaultValueExpression>
</parameter>
<parameter name="VersionNo" class="java.lang.String">
<defaultValueExpression><![CDATA[]]></defaultValueExpression>
</parameter>
<queryString>
<![CDATA[SELECT F.OFFSET_ABLE_AGAINST_SLA_FLAG SLA_PENALTY_APPLICABLE
FROM FCM_TX_BASIC_CONTRACT_DTLS_T F
WHERE F.CONTRACT_ID=$P{ContractId}
AND F.VERSION_NO=$P{VersionNo}]]>
</queryString>
<field name="SLA_PENALTY_APPLICABLE" class="java.lang.String"/>
<background>
<band splitType="Stretch"/>
</background>
<summary>
<band height="193" splitType="Stretch">
<crosstab>
<reportElement uuid="afca47ff-2b31-4479-8fd9-2db0803f75be" x="0" y="0" width="352" height="30"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<rowGroup name="SLA_PENALTY_APPLICABLE" width="200">
<bucket class="java.lang.String">
<bucketExpression><![CDATA[$F{SLA_PENALTY_APPLICABLE}]]></bucketExpression>
</bucket>
<crosstabRowHeader>
<cellContents backcolor="#F0F8FF" mode="Opaque">
<box>
<pen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
</box>
<textField>
<reportElement uuid="43c4f78f-4cea-40cf-8e82-f36ddaa34931" style="Crosstab Data Text" positionType="Float" stretchType="RelativeToBandHeight" mode="Opaque" x="0" y="0" width="200" height="30" backcolor="#C9D9E7"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font fontName="Arial" size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["Is SLA Penalty Applicable"]]></textFieldExpression>
</textField>
</cellContents>
</crosstabRowHeader>
<crosstabTotalRowHeader>
<cellContents/>
</crosstabTotalRowHeader>
</rowGroup>
<columnGroup name="SLA_PENALTY_APPLICABLE1" height="0">
<bucket class="java.lang.String">
<bucketExpression><![CDATA[$F{SLA_PENALTY_APPLICABLE}]]></bucketExpression>
</bucket>
<crosstabColumnHeader>
<cellContents backcolor="#F0F8FF" mode="Opaque">
<box>
<pen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
</box>
<textField>
<reportElement uuid="cbdfcd91-1e22-492f-8400-291e3754a647" style="Crosstab Data Text" x="0" y="0" width="0" height="0"/>
<textElement/>
<textFieldExpression><![CDATA[$V{SLA_PENALTY_APPLICABLE1}]]></textFieldExpression>
</textField>
</cellContents>
</crosstabColumnHeader>
<crosstabTotalColumnHeader>
<cellContents/>
</crosstabTotalColumnHeader>
</columnGroup>
<measure name="SLA_PENALTY_APPLICABLEMeasure" class="java.lang.String">
<measureExpression><![CDATA[$F{SLA_PENALTY_APPLICABLE}]]></measureExpression>
</measure>
<crosstabCell width="100" height="30">
<cellContents>
<box>
<pen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
</box>
<textField isBlankWhenNull="true">
<reportElement uuid="0e7c2221-a1c3-435b-a070-b9e568ea9efd" style="Crosstab Data Text" x="0" y="0" width="100" height="30"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font fontName="Arial" size="8"/>
</textElement>
<textFieldExpression><![CDATA[($V{SLA_PENALTY_APPLICABLEMeasure}=="Y" ? "YES" : "NO")]]></textFieldExpression>
</textField>
</cellContents>
</crosstabCell>
<crosstabCell height="25" rowTotalGroup="SLA_PENALTY_APPLICABLE">
<cellContents backcolor="#BFE1FF" mode="Opaque">
<box>
<pen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
</box>
<textField>
<reportElement uuid="d493ba56-fae0-4dd5-8a99-4faf14e38712" style="Crosstab Data Text" x="0" y="0" width="50" height="25"/>
<textElement/>
<textFieldExpression><![CDATA[$V{SLA_PENALTY_APPLICABLEMeasure}]]></textFieldExpression>
</textField>
</cellContents>
</crosstabCell>
<crosstabCell width="50" columnTotalGroup="SLA_PENALTY_APPLICABLE1">
<cellContents backcolor="#BFE1FF" mode="Opaque">
<box>
<pen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
</box>
<textField>
<reportElement uuid="3d725edb-b344-4a72-9bc3-edc40341772f" style="Crosstab Data Text" x="0" y="0" width="50" height="25"/>
<textElement/>
<textFieldExpression><![CDATA[$V{SLA_PENALTY_APPLICABLEMeasure}]]></textFieldExpression>
</textField>
</cellContents>
</crosstabCell>
<crosstabCell rowTotalGroup="SLA_PENALTY_APPLICABLE" columnTotalGroup="SLA_PENALTY_APPLICABLE1">
<cellContents backcolor="#BFE1FF" mode="Opaque">
<box>
<pen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
</box>
<textField>
<reportElement uuid="5c69995f-0cc5-42e1-a86a-4e31f08fe742" style="Crosstab Data Text" x="0" y="0" width="50" height="25"/>
<textElement/>
<textFieldExpression><![CDATA[$V{SLA_PENALTY_APPLICABLEMeasure}]]></textFieldExpression>
</textField>
</cellContents>
</crosstabCell>
</crosstab>
<componentElement>
<reportElement uuid="2bb4902e-9bde-406f-bba9-222e438a8763" key="table" positionType="Float" x="0" y="60" width="544" height="60"/>
<jr:table xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd">
<datasetRun subDataset="Table Dataset 1" uuid="52f04db6-29b1-455c-91d5-2772c566ecaf">
<datasetParameter name="ContractId">
<datasetParameterExpression><![CDATA[$P{ContractId}]]></datasetParameterExpression>
</datasetParameter>
<datasetParameter name="VersionNo">
<datasetParameterExpression><![CDATA[$P{VersionNo}]]></datasetParameterExpression>
</datasetParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
</datasetRun>
<jr:column width="228" uuid="945031dd-9af7-4006-875f-02e4d11e398b">
<jr:columnHeader height="30" rowSpan="1">
<staticText>
<reportElement uuid="d6af52b2-275b-4550-8224-ac9df9140b77" positionType="Float" mode="Opaque" x="0" y="0" width="228" height="30" backcolor="#C9D9E7"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="Arial" size="8" isBold="true"/>
</textElement>
<text><![CDATA[To Period]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell height="30" rowSpan="1">
<textField isBlankWhenNull="true">
<reportElement uuid="5e488693-ccb6-422a-94db-b9a51929bf18" positionType="Float" x="0" y="0" width="228" height="30"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="Arial" size="8" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{TERM_PERIOD}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="90" uuid="5aa31cc5-eebe-4fae-84b3-6c6f86252646">
<jr:columnHeader height="30" rowSpan="1">
<staticText>
<reportElement uuid="5fed7f50-4457-4072-854b-a3331f804c31" positionType="Float" mode="Opaque" x="0" y="0" width="90" height="30" backcolor="#C9D9E7"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="Arial" size="8" isBold="true"/>
</textElement>
<text><![CDATA[Charges]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell height="30" rowSpan="1">
<textField isBlankWhenNull="true">
<reportElement uuid="77280405-3de8-42c1-9c36-8e158bdfbdc0" positionType="Float" x="0" y="0" width="90" height="30"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="Arial" size="8" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{TERM_CHARGES}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="90" uuid="8a20f747-a47a-48b4-9eb1-4ad915a47d0b">
<jr:columnHeader height="30" rowSpan="1">
<staticText>
<reportElement uuid="a6225afd-a866-49de-9947-66951eea9aa8" positionType="Float" mode="Opaque" x="0" y="0" width="90" height="30" backcolor="#C9D9E7"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="Arial" size="8" isBold="true"/>
</textElement>
<text><![CDATA[Currency]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell height="30" rowSpan="1">
<textField isBlankWhenNull="true">
<reportElement uuid="2996e9c3-f442-4f63-82f3-0f01261071c9" positionType="Float" x="0" y="0" width="90" height="30"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="Arial" size="8" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{TERM_CURRENCY_ID}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="137" uuid="1ed6d1ab-4a5a-4e01-8dc6-f4db2fcb2449">
<jr:columnHeader height="30" rowSpan="1">
<staticText>
<reportElement uuid="fd766b4a-c62e-4a59-a1b4-06cc70a4f0c1" positionType="Float" mode="Opaque" x="0" y="0" width="136" height="30" backcolor="#C9D9E7"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="Arial" size="8" isBold="true"/>
</textElement>
<text><![CDATA[Comments]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell height="30" rowSpan="1">
<textField isBlankWhenNull="true">
<reportElement uuid="dda79124-8bec-49b3-9bbe-713a890283b7" positionType="Float" x="0" y="0" width="136" height="30"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="Arial" size="8" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{TERM_COMMENTS}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
</jr:table>
</componentElement>
<staticText>
<reportElement uuid="efd6c25c-339b-4750-8d1b-79b897a993bb" mode="Opaque" x="0" y="40" width="544" height="20" backcolor="#C9D9E7"/>
<box>
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5"/>
<leftPen lineWidth="0.5"/>
<bottomPen lineWidth="0.5"/>
<rightPen lineWidth="0.5"/>
</box>
<textElement>
<font fontName="Arial" isBold="true"/>
</textElement>
<text><![CDATA[ Temination charges for convenience]]></text>
</staticText>
</band>
</summary>
</jasperReport>
'Я настраиваю создание пользовательской палитры на истину' - о чем вы говорите? –
Вы должны опубликовать файл * jrxml * –
Я устанавливаю большинство свойств на стороне java. – Vikash