Jump to content
We've recently updated our Privacy Statement, available here ×

i have created a table in Jasper report and i want certain columns to be highligted if they exceed specific value, but only one column s following this condition others are not changing color


nikhilpandey62

Recommended Posts

here is the jrmxl:

 

<?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="report name" pageWidth="2380" pageHeight="3368" columnWidth="2340" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="45dbfd10-37af-4bd0-8ecd-2025cd5e8464">
<property name="ireport.zoom" value="1.0"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<style name="table">
<box>
<pen lineWidth="1.0" lineColor="#000000"/>
</box>
</style>
<style name="table_TH" mode="Opaque" backcolor="#00FFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table_CH" mode="Opaque" backcolor="#BFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="BackgroundStyle">
<conditionalStyle>
<conditionExpression><![CDATA[($F{FAILURE_PERCENT_10}.intValue()>=65) && ($F{BRAND_TYPE}.trim().equals("Total_Balance"))]]></conditionExpression>
<style/>
</conditionalStyle>
<conditionalStyle>
<conditionExpression><![CDATA[($F{FAILURE_PERCENT_10}.intValue()>1) && ($F{BRAND_TYPE}.toString().equals("Total_ADV"))]]></conditionExpression>
<style mode="Opaque" backcolor="#FC0223"/>
</conditionalStyle>
<conditionalStyle>
<conditionExpression><![CDATA[($F{FAILURE_PERCENT_10}.intValue()>20) && ($F{BRAND_TYPE}.toString().equals("Total_CreditCard"))]]></conditionExpression>
<style mode="Opaque" backcolor="#FC0223"/>
</conditionalStyle>
<conditionalStyle>
<conditionExpression><![CDATA[($F{FAILURE_PERCENT_5}.intValue()>=(65)) && ($F{BRAND_TYPE}.toString().equals("Total_Balance"))]]></conditionExpression>
<style mode="Opaque" backcolor="#FC0223"/>
</conditionalStyle>
<conditionalStyle>
<conditionExpression><![CDATA[($F{FAILURE_PERCENT_5}.intValue()>1) && ($F{BRAND_TYPE}.toString().equals("Total_ADV"))]]></conditionExpression>
<style mode="Opaque" backcolor="#FC0223"/>
</conditionalStyle>
<conditionalStyle>
<conditionExpression><![CDATA[($F{FAILURE_PERCENT_5}.intValue()>20) && ($F{BRAND_TYPE}.toString().equals("Total_CreditCard"))]]></conditionExpression>
<style mode="Opaque" backcolor="#FC0223"/>
</conditionalStyle>
<conditionalStyle>
<conditionExpression><![CDATA[($F{FAILURE_PERCENT_6}.intValue()>=65) && ($F{BRAND_TYPE}.toString().equals("Total_Balance"))]]></conditionExpression>
<style mode="Opaque" backcolor="#FC0223"/>
</conditionalStyle>
<conditionalStyle>
<conditionExpression><![CDATA[($F{FAILURE_PERCENT_6}.intValue()>1) && ($F{BRAND_TYPE}.toString().equals("Total_ADV"))]]></conditionExpression>
<style mode="Opaque" backcolor="#FC0223"/>
</conditionalStyle>
<conditionalStyle>
<conditionExpression><![CDATA[($F{FAILURE_PERCENT_6}.intValue()>20) && ($F{BRAND_TYPE}.toString().equals("Total_CreditCard"))]]></conditionExpression>
<style mode="Opaque" backcolor="#FC0223"/>
</conditionalStyle>
<conditionalStyle>
<conditionExpression><![CDATA[($F{FAILURE_PERCENT_4}.intValue()>=65) && ($F{BRAND_TYPE}.toString().equals("Total_Balance"))]]></conditionExpression>
<style mode="Opaque" backcolor="#FC0223"/>
</conditionalStyle>
<conditionalStyle>
<conditionExpression><![CDATA[($F{FAILURE_PERCENT_4}.intValue()>1) && ($F{BRAND_TYPE}.toString().equals("Total_ADV"))]]></conditionExpression>
<style mode="Opaque" backcolor="#FC0223"/>
</conditionalStyle>
<conditionalStyle>
<conditionExpression><![CDATA[($F{FAILURE_PERCENT_4}.intValue()>20) && ($F{BRAND_TYPE}.toString().equals("Total_CreditCard"))]]></conditionExpression>
<style mode="Opaque" backcolor="#FC0223"/>
</conditionalStyle>
<conditionalStyle>
<conditionExpression><![CDATA[($F{FAILURE_PERCENT_7}.intValue()>=65) && ($F{BRAND_TYPE}.toString().equals("Total_Balance"))]]></conditionExpression>
<style mode="Opaque" backcolor="#FC0223"/>
</conditionalStyle>
<conditionalStyle>
<conditionExpression><![CDATA[($F{FAILURE_PERCENT_7}.intValue()>1) && ($F{BRAND_TYPE}.toString().equals("Total_ADV"))]]></conditionExpression>
<style mode="Opaque" backcolor="#FC0223"/>
</conditionalStyle>
<conditionalStyle>
<conditionExpression><![CDATA[($F{FAILURE_PERCENT_7}.intValue()>20) && ($F{BRAND_TYPE}.toString().equals("Total_CreditCard"))]]></conditionExpression>
<style mode="Opaque" backcolor="#FC0223"/>
</conditionalStyle>
<conditionalStyle>
<conditionExpression><![CDATA[($F{FAILURE_PERCENT_8}.intValue()>=65) && ($F{BRAND_TYPE}.toString().equals("Total_Balance"))]]></conditionExpression>
<style mode="Opaque" backcolor="#FC0223"/>
</conditionalStyle>
<conditionalStyle>
<conditionExpression><![CDATA[($F{FAILURE_PERCENT_8}.intValue()>1) && ($F{BRAND_TYPE}.toString().equals("Total_ADV"))]]></conditionExpression>
<style mode="Opaque" backcolor="#FC0223"/>
</conditionalStyle>
<conditionalStyle>
<conditionExpression><![CDATA[($F{FAILURE_PERCENT_8}.intValue()>20) && ($F{BRAND_TYPE}.toString().equals("Total_CreditCard"))]]></conditionExpression>
<style mode="Opaque" backcolor="#FC0223"/>
</conditionalStyle>
</style>
<subDataset name="ALL" uuid="a8871c2d-90e2-40c0-b862-73da9d34ef03">
<queryString>
<![CDATA[select MRC_DATE, BRAND_TYPE, sum(TZ4_SUC) TZ4_SUC, sum(FAIL4) TZ4_Fail, 
ROUND (sum(FAIL4)/(sum(TZ4_SUC)+sum(FAIL4))*100, 2) FAILURE_PERCENT_4,
sum(TZ5_SUC) TZ5_SUC, sum(FAIL5) TZ5_Fail, 
 ROUND (sum(FAIL5)/(sum(TZ5_SUC)+sum(FAIL5))*100, 2) FAILURE_PERCENT_5,
sum(TZ6_SUC) TZ6_SUC, sum(FAIL6) TZ6_Fail, 
  ROUND(sum(FAIL6)/(sum(TZ6_SUC)+sum(FAIL6))*100, 2) FAILURE_PERCENT_6,
sum(TZ7_SUC) TZ7_SUC , sum(FAIL7) TZ7_Fail,
  ROUND(sum(FAIL7)/(sum(TZ7_SUC)+sum(FAIL7))*100,2) FAILURE_PERCENT_7,
sum(TZ8_SUC) TZ8_SUC,  sum(FAIL8) TZ8_Fail, 
  ROUND(sum(FAIL8)/(sum(TZ8_SUC)+sum(FAIL8))*100,2) FAILURE_PERCENT_8,
sum(SCU10) TZ10_SUC, sum(FAIL10) TZ10_Fail, 
   ROUND(sum(FAIL10)/(sum(SCU10)+sum(FAIL10))*100 , 2) FAILURE_PERCENT_10,
sum(TZ4_SUC)+  sum(TZ5_SUC) + sum(TZ6_SUC) + sum(TZ7_SUC) + sum(TZ8_SUC) + sum(SCU10) Total_SUCESS,
sum(FAIL4) + SUM(FAIL5) + sum(FAIL6) + sum(FAIL7) + sum(FAIL8) + sum(FAIL10) Total_FAILURE,
  sum(TZ4_SUC)+  sum(TZ5_SUC) + sum(TZ6_SUC) + sum(TZ7_SUC) + sum(TZ8_SUC) + sum(SCU10) +
sum(FAIL4) + SUM(FAIL5) + sum(FAIL6) + sum(FAIL7) + sum(FAIL8) + sum(FAIL10) SUCESS_FAILURE
   from (
  select MRC_DATE, BRAND_TYPE, TZ4_SUC, FAIL4, TZ5_SUC, FAIL5, TZ6_SUC, FAIL6, TZ7_SUC, FAIL7, TZ8_SUC, FAIL8, SCU10, FAIL10
  from 
 ( (select MRC_DATE,  BRAND_TYPE, SUCCESS, FAILURE, TIMEZONE , TIMEZONE  AS TZ
  from ogs_mrc_trend 
  where brand_type like '%Tot%' and MRC_DATE > sysdate -4  )  
PIVOT (SUM(SUCCESS)  
FOR TIMEZONE IN('4' as TZ4_SUC, '5' as TZ5_SUC, '6' as TZ6_SUC, '7' as TZ7_SUC , '8' as TZ8_SUC, '10' as SCU10 )) pvt1
PIVOT (sum(FAILURE) 
 FOR TZ IN('4' as FAIL4, '5' as FAIL5, '6' as FAIL6, '7' as FAIL7 , '8' as FAIL8, '10' as FAIL10 )) pvt2) )
  group by MRC_DATE, BRAND_TYPE
order by  BRAND_TYPE asc,MRC_DATE asc]]>
</queryString>
<field name="MRC_DATE" class="java.sql.Timestamp"/>
<field name="BRAND_TYPE" class="java.lang.String"/>
<field name="TZ4_SUC" class="java.math.BigDecimal"/>
<field name="TZ4_FAIL" class="java.math.BigDecimal"/>
<field name="FAILURE_PERCENT_4" class="java.math.BigDecimal"/>
<field name="TZ5_SUC" class="java.math.BigDecimal"/>
<field name="TZ5_FAIL" class="java.math.BigDecimal"/>
<field name="FAILURE_PERCENT_5" class="java.math.BigDecimal"/>
<field name="TZ6_SUC" class="java.math.BigDecimal"/>
<field name="TZ6_FAIL" class="java.math.BigDecimal"/>
<field name="FAILURE_PERCENT_6" class="java.math.BigDecimal"/>
<field name="TZ7_SUC" class="java.math.BigDecimal"/>
<field name="TZ7_FAIL" class="java.math.BigDecimal"/>
<field name="FAILURE_PERCENT_7" class="java.math.BigDecimal"/>
<field name="TZ8_SUC" class="java.math.BigDecimal"/>
<field name="TZ8_FAIL" class="java.math.BigDecimal"/>
<field name="FAILURE_PERCENT_8" class="java.math.BigDecimal"/>
<field name="TZ10_SUC" class="java.math.BigDecimal"/>
<field name="TZ10_FAIL" class="java.math.BigDecimal"/>
<field name="FAILURE_PERCENT_10" class="java.math.BigDecimal"/>
<field name="TOTAL_SUCESS" class="java.math.BigDecimal"/>
<field name="TOTAL_FAILURE" class="java.math.BigDecimal"/>
<field name="SUCESS_FAILURE" class="java.math.BigDecimal"/>
</subDataset>
<parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false">
<defaultValueExpression><![CDATA["C:\Users\nipandey\Desktop\MRC\MRC_DRC\src\java\MRCReports\"]]></defaultValueExpression>
</parameter>
<queryString>
<![CDATA[select MRC_DATE, BRAND_TYPE, sum(TZ4_SUC) TZ4_SUC, sum(FAIL4) TZ4_Fail, 
ROUND (sum(FAIL4)/(sum(TZ4_SUC)+sum(FAIL4))*100, 2) FAILURE_PERCENT_4,
sum(TZ5_SUC) TZ5_SUC, sum(FAIL5) TZ5_Fail, 
 ROUND (sum(FAIL5)/(sum(TZ5_SUC)+sum(FAIL5))*100, 2) FAILURE_PERCENT_5,
sum(TZ6_SUC) TZ6_SUC, sum(FAIL6) TZ6_Fail, 
  ROUND(sum(FAIL6)/(sum(TZ6_SUC)+sum(FAIL6))*100, 2) FAILURE_PERCENT_6,
sum(TZ7_SUC) TZ7_SUC , sum(FAIL7) TZ7_Fail,
  ROUND(sum(FAIL7)/(sum(TZ7_SUC)+sum(FAIL7))*100,2) FAILURE_PERCENT_7,
sum(TZ8_SUC) TZ8_SUC,  sum(FAIL8) TZ8_Fail, 
  ROUND(sum(FAIL8)/(sum(TZ8_SUC)+sum(FAIL8))*100,2) FAILURE_PERCENT_8,
sum(SCU10) TZ10_SUC, sum(FAIL10) TZ10_Fail, 
   ROUND(sum(FAIL10)/(sum(SCU10)+sum(FAIL10))*100 , 2) FAILURE_PERCENT_10,
sum(TZ4_SUC)+  sum(TZ5_SUC) + sum(TZ6_SUC) + sum(TZ7_SUC) + sum(TZ8_SUC) + sum(SCU10) Total_SUCESS,
sum(FAIL4) + SUM(FAIL5) + sum(FAIL6) + sum(FAIL7) + sum(FAIL8) + sum(FAIL10) Total_FAILURE,
  sum(TZ4_SUC)+  sum(TZ5_SUC) + sum(TZ6_SUC) + sum(TZ7_SUC) + sum(TZ8_SUC) + sum(SCU10) +
sum(FAIL4) + SUM(FAIL5) + sum(FAIL6) + sum(FAIL7) + sum(FAIL8) + sum(FAIL10) SUCESS_FAILURE
   from (
  select MRC_DATE, BRAND_TYPE, TZ4_SUC, FAIL4, TZ5_SUC, FAIL5, TZ6_SUC, FAIL6, TZ7_SUC, FAIL7, TZ8_SUC, FAIL8, SCU10, FAIL10
  from 
 ( (select MRC_DATE,  BRAND_TYPE, SUCCESS, FAILURE, TIMEZONE , TIMEZONE  AS TZ
  from ogs_mrc_trend 
  where brand_type like '%Tot%' and MRC_DATE > sysdate -4  )  
PIVOT (SUM(SUCCESS)  
FOR TIMEZONE IN('4' as TZ4_SUC, '5' as TZ5_SUC, '6' as TZ6_SUC, '7' as TZ7_SUC , '8' as TZ8_SUC, '10' as SCU10 )) pvt1
PIVOT (sum(FAILURE) 
 FOR TZ IN('4' as FAIL4, '5' as FAIL5, '6' as FAIL6, '7' as FAIL7 , '8' as FAIL8, '10' as FAIL10 )) pvt2) )
  group by MRC_DATE, BRAND_TYPE
order by  BRAND_TYPE asc,MRC_DATE asc]]>
</queryString>
<field name="MRC_DATE" class="java.sql.Timestamp"/>
<field name="BRAND_TYPE" class="java.lang.String"/>
<field name="TZ4_SUC" class="java.math.BigDecimal"/>
<field name="TZ4_FAIL" class="java.math.BigDecimal"/>
<field name="FAILURE_PERCENT_4" class="java.math.BigDecimal"/>
<field name="TZ5_SUC" class="java.math.BigDecimal"/>
<field name="TZ5_FAIL" class="java.math.BigDecimal"/>
<field name="FAILURE_PERCENT_5" class="java.math.BigDecimal"/>
<field name="TZ6_SUC" class="java.math.BigDecimal"/>
<field name="TZ6_FAIL" class="java.math.BigDecimal"/>
<field name="FAILURE_PERCENT_6" class="java.math.BigDecimal"/>
<field name="TZ7_SUC" class="java.math.BigDecimal"/>
<field name="TZ7_FAIL" class="java.math.BigDecimal"/>
<field name="FAILURE_PERCENT_7" class="java.math.BigDecimal"/>
<field name="TZ8_SUC" class="java.math.BigDecimal"/>
<field name="TZ8_FAIL" class="java.math.BigDecimal"/>
<field name="FAILURE_PERCENT_8" class="java.math.BigDecimal"/>
<field name="TZ10_SUC" class="java.math.BigDecimal"/>
<field name="TZ10_FAIL" class="java.math.BigDecimal"/>
<field name="FAILURE_PERCENT_10" class="java.math.BigDecimal"/>
<field name="TOTAL_SUCESS" class="java.math.BigDecimal"/>
<field name="TOTAL_FAILURE" class="java.math.BigDecimal"/>
<field name="SUCESS_FAILURE" class="java.math.BigDecimal"/>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="79" splitType="Stretch">
<staticText>
<reportElement x="502" y="0" width="363" height="59" uuid="6425e2ec-6291-4455-9653-dc108f01df9b"/>
<textElement textAlignment="Center">
<font size="36" isBold="true"/>
</textElement>
<text><![CDATA[All Timezone Trends]]></text>
</staticText>
</band>
</title>
<pageHeader>
<band height="50">
<staticText>
<reportElement x="570" y="0" width="220" height="50" uuid="0897d394-8b22-4f6d-8772-64378a690f5a"/>
<textElement textAlignment="Center">
<font fontName="Arial" size="24" isBold="true"/>
</textElement>
<text><![CDATA[MRC]]></text>
</staticText>
</band>
</pageHeader>
<summary>
<band height="1526" splitType="Stretch">
<componentElement>
<reportElement key="table 3" style="table" x="0" y="0" width="360" height="140" uuid="aa90dccd-ea7d-4242-b2da-73f2f691086c"/>
<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="ALL" uuid="a2f483a2-2eca-4db7-a7db-d5bdef1837db">
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
</datasetRun>
<jr:column width="90" uuid="2d24bf78-29ab-4c28-9ec1-10e90cc60517">
<jr:tableHeader style="table_TH" height="30" rowSpan="1"/>
<jr:tableFooter style="table_TH" height="30" rowSpan="1"/>
<jr:columnHeader style="table_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="90" height="30" uuid="336df0d5-f3d3-4015-ada3-7a36052015c3"/>
<textElement textAlignment="Center">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[MRC_DATE]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table_TD" height="20" rowSpan="1">
<textField>
<reportElement x="0" y="0" width="90" height="20" uuid="a3c3a38b-cb97-4e8e-8631-877126459621"/>
<textElement textAlignment="Center">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{MRC_DATE}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="90" uuid="888658fb-4099-4f77-9093-27c468d5858f">
<jr:tableHeader style="table_TH" height="30" rowSpan="1"/>
<jr:tableFooter style="table_TH" height="30" rowSpan="1"/>
<jr:columnHeader style="table_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="90" height="30" uuid="df26675b-839f-4418-8001-b48c759f75b8"/>
<textElement textAlignment="Center">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[bRAND_TYPE]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table_TD" height="20" rowSpan="1">
<textField>
<reportElement x="0" y="0" width="90" height="20" uuid="e87c65a6-1548-4953-9780-3279c5927c47"/>
<textElement textAlignment="Center">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{BRAND_TYPE}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="90" uuid="f5ef47b5-3e6d-4e14-948d-876e55ff2cb4">
<jr:tableHeader style="table_TH" height="30" rowSpan="1"/>
<jr:tableFooter style="table_TH" height="30" rowSpan="1"/>
<jr:columnHeader style="table_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="90" height="30" uuid="3b67f8aa-68e7-41be-a322-c56483f43b35"/>
<textElement textAlignment="Center">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[TZ4_SUC]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table_TD" height="20" rowSpan="1">
<textField>
<reportElement x="0" y="0" width="90" height="20" uuid="6b809d8d-1621-4cf2-9a80-98c667877962"/>
<textElement textAlignment="Center">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{TZ4_SUC}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="90" uuid="984c798d-6234-420e-baec-82c4a7c52304">
<jr:tableHeader style="table_TH" height="30" rowSpan="1"/>
<jr:tableFooter style="table_TH" height="30" rowSpan="1"/>
<jr:columnHeader style="table_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="90" height="30" uuid="cf5a256e-e320-400d-9e2a-8b39cf967340"/>
<textElement textAlignment="Center">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[TZ4_FAIL]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table_TD" height="20" rowSpan="1">
<textField>
<reportElement x="0" y="0" width="90" height="20" uuid="3430c879-d04d-4c3e-af66-875c17ddd12c"/>
<textElement textAlignment="Center">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{TZ4_FAIL}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="139" uuid="ffb9fb54-758b-4a8f-9ad4-699c6c558e37">
<jr:tableHeader style="table_TH" height="30" rowSpan="1"/>
<jr:tableFooter style="table_TH" height="30" rowSpan="1"/>
<jr:columnHeader style="table_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="138" height="30" uuid="51a77ce6-661c-45fa-9d85-807cc0450ce9"/>
<textElement textAlignment="Center">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[FAILURE_PERCENT_4]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="BackgroundStyle" height="20" rowSpan="1">
<textField>
<reportElement x="0" y="0" width="138" height="20" uuid="d02bce2f-0dd7-41f0-823e-ab89f6ba8d34"/>
<textElement textAlignment="Center">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{FAILURE_PERCENT_4}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="90" uuid="8d286755-97a2-4f60-a33c-e42077d7654b">
<jr:tableHeader style="table_TH" height="30" rowSpan="1"/>
<jr:tableFooter style="table_TH" height="30" rowSpan="1"/>
<jr:columnHeader style="table_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="90" height="30" uuid="c17b093f-289e-44dd-a678-5eab31a3b404"/>
<textElement textAlignment="Center">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[TZ5_SUC]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table_TD" height="20" rowSpan="1">
<textField>
<reportElement x="0" y="0" width="90" height="20" uuid="af91fc1f-3ed5-48ea-b791-591b87cb7d27"/>
<textElement textAlignment="Center">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{TZ5_SUC}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="90" uuid="4edf91c5-d3a8-443d-8b96-909b2df9d45b">
<jr:tableHeader style="table_TH" height="30" rowSpan="1"/>
<jr:tableFooter style="table_TH" height="30" rowSpan="1"/>
<jr:columnHeader style="table_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="90" height="30" uuid="20bfe3fa-b3af-4770-9e98-260456f835c0"/>
<textElement textAlignment="Center">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[TZ5_FAIL]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table_TD" height="20" rowSpan="1">
<textField>
<reportElement x="0" y="0" width="90" height="20" uuid="51f19ecb-f885-4802-bd93-eb28f7964f3b"/>
<textElement textAlignment="Center">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{TZ5_FAIL}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="155" uuid="e8b4286d-fc3c-4cdc-ba85-d2ae8c50269d">
<jr:tableHeader style="table_TH" height="30" rowSpan="1"/>
<jr:tableFooter style="table_TH" height="30" rowSpan="1"/>
<jr:columnHeader style="table_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="153" height="30" uuid="befaea7b-3ce6-4744-a799-8bf9555670cd"/>
<textElement textAlignment="Center">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[FAILURE_PERCENT_5]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="BackgroundStyle" height="20" rowSpan="1">
<textField>
<reportElement x="0" y="0" width="153" height="20" uuid="c4f6b99d-b438-47a3-8a9d-588f2d1223fb"/>
<textElement textAlignment="Center">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{FAILURE_PERCENT_5}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="90" uuid="ac1554f3-714d-431c-b53d-163777d95a22">
<jr:tableHeader style="table_TH" height="30" rowSpan="1"/>
<jr:tableFooter style="table_TH" height="30" rowSpan="1"/>
<jr:columnHeader style="table_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="90" height="30" uuid="76b33d32-cf2b-42c8-98c8-f43f255a4686"/>
<textElement textAlignment="Center">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[TZ6_SUC]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table_TD" height="20" rowSpan="1">
<textField>
<reportElement x="0" y="0" width="90" height="20" uuid="19962e70-85f7-4768-aae7-93567b78afc9"/>
<textElement textAlignment="Center">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{TZ6_SUC}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="90" uuid="682bee9d-53bf-4a59-b6a3-7d7bdef3fa45">
<jr:tableHeader style="table_TH" height="30" rowSpan="1"/>
<jr:tableFooter style="table_TH" height="30" rowSpan="1"/>
<jr:columnHeader style="table_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="90" height="30" uuid="73dd9a48-00cf-4610-9156-2f48cd6c06c1"/>
<textElement textAlignment="Center">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[TZ6_FAIL]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table_TD" height="20" rowSpan="1">
<textField>
<reportElement x="0" y="0" width="90" height="20" uuid="3fe39a59-7969-47dd-89a5-b6cd5c33f695"/>
<textElement textAlignment="Center">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{TZ6_FAIL}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="135" uuid="3270da5c-8499-41dc-adf6-08039728358d">
<jr:tableHeader style="table_TH" height="30" rowSpan="1"/>
<jr:tableFooter style="table_TH" height="30" rowSpan="1"/>
<jr:columnHeader style="table_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="135" height="30" uuid="4f06eba7-acf6-4289-9a75-bcddf37e9258"/>
<textElement textAlignment="Center">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[FAILURE_PERCENT_6]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="BackgroundStyle" height="20" rowSpan="1">
<textField>
<reportElement x="0" y="0" width="135" height="20" uuid="c065e484-ae4f-4349-a7d2-5d454f43c296"/>
<textElement textAlignment="Center">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{FAILURE_PERCENT_6}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="90" uuid="8b23280e-9ef3-4dc6-ae50-499847a259bb">
<jr:tableHeader style="table_TH" height="30" rowSpan="1"/>
<jr:tableFooter style="table_TH" height="30" rowSpan="1"/>
<jr:columnHeader style="table_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="90" height="30" uuid="04c0eb33-bb2d-4cdf-9934-b88bdfb39fb3"/>
<textElement textAlignment="Center">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[TZ7_SUC]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table_TD" height="20" rowSpan="1">
<textField>
<reportElement x="0" y="0" width="90" height="20" uuid="34e11634-f8cb-4283-98fd-a7b903cf0339"/>
<textElement textAlignment="Center">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{TZ7_SUC}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="90" uuid="177e0a1f-7950-4d97-aa12-a84330ac3215">
<jr:tableHeader style="table_TH" height="30" rowSpan="1"/>
<jr:tableFooter style="table_TH" height="30" rowSpan="1"/>
<jr:columnHeader style="table_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="90" height="30" uuid="06131e43-53cb-4286-b5ad-7e5fb119de63"/>
<textElement textAlignment="Center">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[TZ7_FAIL]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table_TD" height="20" rowSpan="1">
<textField>
<reportElement x="0" y="0" width="90" height="20" uuid="28070653-22ca-4cdc-8fae-a74c18beea6a"/>
<textElement textAlignment="Center">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{TZ7_FAIL}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="140" uuid="85f2c19b-5cf4-45a3-b0ff-16f407963c73">
<jr:tableHeader style="table_TH" height="30" rowSpan="1"/>
<jr:tableFooter style="table_TH" height="30" rowSpan="1"/>
<jr:columnHeader style="table_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="140" height="30" uuid="0876e4f6-b3ad-4e08-b746-b6f29548e685"/>
<textElement textAlignment="Center">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[FAILURE_PERCENT_7]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="BackgroundStyle" height="20" rowSpan="1">
<textField>
<reportElement x="0" y="0" width="140" height="20" uuid="a9eac66d-9ca6-4c27-a399-5fba84e97980"/>
<textElement textAlignment="Center">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{FAILURE_PERCENT_7}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="90" uuid="6390ab89-3c00-4cfd-804d-6fba725486ed">
<jr:tableHeader style="table_TH" height="30" rowSpan="1"/>
<jr:tableFooter style="table_TH" height="30" rowSpan="1"/>
<jr:columnHeader style="table_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="90" height="30" uuid="64063ae2-b5df-4605-803f-a21890170226"/>
<textElement textAlignment="Center">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[TZ8_SUC]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table_TD" height="20" rowSpan="1">
<textField>
<reportElement x="0" y="0" width="90" height="20" uuid="c2d419ef-9c59-4bc7-b042-d2ccc8167f6e"/>
<textElement textAlignment="Center">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{TZ8_SUC}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="90" uuid="77767482-0292-48bf-81ac-43087e3593b8">
<jr:tableHeader style="table_TH" height="30" rowSpan="1"/>
<jr:tableFooter style="table_TH" height="30" rowSpan="1"/>
<jr:columnHeader style="table_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="90" height="30" uuid="0a76a6c5-c1b9-440c-9903-86125f66c288"/>
<textElement textAlignment="Center">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[TZ8_FAIL]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table_TD" height="20" rowSpan="1">
<textField>
<reportElement x="0" y="0" width="90" height="20" uuid="f816d14e-40fb-487c-81f4-c5bb1cdc6c81"/>
<textElement textAlignment="Center">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{TZ8_FAIL}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="138" uuid="f0534f7c-da8e-4e5c-9e99-6e5f67b638c7">
<jr:tableHeader style="table_TH" height="30" rowSpan="1"/>
<jr:tableFooter style="table_TH" height="30" rowSpan="1"/>
<jr:columnHeader style="table_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="138" height="30" uuid="a7f35fcc-882e-40a0-95dd-bf1a2bf818f2"/>
<textElement textAlignment="Center">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[FAILURE_PERCENT_8]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="BackgroundStyle" height="20" rowSpan="1">
<textField>
<reportElement x="0" y="0" width="138" height="20" uuid="eaf1aaa3-03f2-4fde-8541-7df9a73782d4"/>
<textElement textAlignment="Center">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{FAILURE_PERCENT_8}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="90" uuid="a3cf6714-7195-49ca-8618-c005684ef177">
<jr:tableHeader style="table_TH" height="30" rowSpan="1"/>
<jr:tableFooter style="table_TH" height="30" rowSpan="1"/>
<jr:columnHeader style="table_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="90" height="30" uuid="43d8bc4d-fc11-4607-8cd9-16b84329d812"/>
<textElement textAlignment="Center">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[TZ10_SUC]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table_TD" height="20" rowSpan="1">
<textField>
<reportElement x="0" y="0" width="90" height="20" uuid="6178171d-72c2-425b-8db0-266e5d8a14cc"/>
<textElement textAlignment="Center">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{TZ10_SUC}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="90" uuid="c2abb79f-5e4f-400c-8f98-3ff6d7ed0b9f">
<jr:tableHeader style="table_TH" height="30" rowSpan="1"/>
<jr:tableFooter style="table_TH" height="30" rowSpan="1"/>
<jr:columnHeader style="table_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="90" height="30" uuid="48ecb591-6702-4b0b-8547-4d0dcfaa4dd7"/>
<textElement textAlignment="Center">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[TZ10_FAIL]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table_TD" height="20" rowSpan="1">
<textField>
<reportElement x="0" y="0" width="90" height="20" uuid="87df03cd-f4d9-4909-9a4d-9dc756a740f1"/>
<textElement textAlignment="Center">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{TZ10_FAIL}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="139" uuid="f5f436e6-f86d-4ed9-9490-a3a12f047b98">
<jr:tableHeader style="table_TH" height="30" rowSpan="1"/>
<jr:tableFooter style="table_TH" height="30" rowSpan="1"/>
<jr:columnHeader style="table_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="139" height="30" uuid="d2d0c8a0-0250-4b19-a499-ff5a345d84a4"/>
<textElement textAlignment="Center">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[FAILURE_PERCENT_10]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="BackgroundStyle" height="20" rowSpan="1">
<textField>
<reportElement x="0" y="0" width="139" height="20" uuid="a2549bef-3eaf-4da3-a2eb-122a2b6c7051"/>
<textElement textAlignment="Center">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{FAILURE_PERCENT_10}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="90" uuid="1a6cc9d5-2e60-4148-8dc2-cc1e29accb53">
<jr:tableHeader style="table_TH" height="30" rowSpan="1"/>
<jr:tableFooter style="table_TH" height="30" rowSpan="1"/>
<jr:columnHeader style="table_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="90" height="30" uuid="f539d43d-5574-4888-a81f-aeefffc38dc9"/>
<textElement textAlignment="Center">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[TOTAL_SUCESS]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table_TD" height="20" rowSpan="1">
<textField>
<reportElement x="0" y="0" width="90" height="20" uuid="bec260ec-b8b7-4587-a420-a0ca21bc27d6"/>
<textElement textAlignment="Center">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{TOTAL_SUCESS}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="134" uuid="be1ce8a2-a744-408a-a989-c0a9b990bc74">
<jr:tableHeader style="table_TH" height="30" rowSpan="1"/>
<jr:tableFooter style="table_TH" height="30" rowSpan="1"/>
<jr:columnHeader style="table_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="134" height="30" uuid="c5a3fa0f-d003-4b3e-b83e-dc9e213e51ae"/>
<textElement textAlignment="Center">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[TOTAL_FAILURE]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table_TD" height="20" rowSpan="1">
<textField>
<reportElement x="0" y="0" width="134" height="20" uuid="5aa24d42-f9f3-4f2c-a379-d29913baf72d"/>
<textElement textAlignment="Center">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{TOTAL_FAILURE}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="90" uuid="eb10ce3c-49dd-4deb-a700-01b4eeabc44e">
<jr:tableHeader style="table_TH" height="30" rowSpan="1"/>
<jr:tableFooter style="table_TH" height="30" rowSpan="1"/>
<jr:columnHeader style="table_CH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="90" height="30" uuid="123537e3-1d0f-464d-b7db-cca24e69a345"/>
<textElement textAlignment="Center">
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[sUCESS_FAILURE]]></text>
</staticText>
</jr:columnHeader>
<jr:detailCell style="table_TD" height="20" rowSpan="1">
<textField>
<reportElement x="0" y="0" width="90" height="20" uuid="bd62e37e-5404-46d3-a343-8d0bce072a11"/>
<textElement textAlignment="Center">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{SUCESS_FAILURE}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
</jr:table>
</componentElement>
</band>
</summary>
</jasperReport>
 

 

 

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

I am not sure if you need entire column to change color based on the total, or a single table cell.

If the color depends on the field value only, you can use conditional styling.

If your colors depends on the column total (and not the field value), then you may try to do following: 

1. create overlay of 2 text fields with value of empty string, use background color to highlight; place those fields underneath your actual field which should be transparent

2. create a variable to track column total, then use that variable as condition to show / hide the fields from the previous step

3. evaluation time of the colored fields should be set to after the variable evaluation time in order to use it in the show / hide condition

 

If the output is into Excel file, check for the excel-safe color palette.

 

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...