Jump to content
Changes to the Jaspersoft community edition download ×

When exporting to Doc or Excel there is no colour coding of the box


vs00500773

Recommended Posts

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Thanks.  Here is the code and let me know if I miss something

</textField>
                <rectangle>
                    <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="580" y="130" width="270" height="60" backcolor="#22B14C" uuid="b2320466-d37d-4bf6-a971-3fca7cbfab87">
                        <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                        <printWhenExpression><![CDATA[(($F{STATUS_NAME}.matches( "Approved") && $F{HRDBOOKED}.intValue()!=0) ||
($F{STATUS_NAME}.matches("Approved" )  && $F{NTHRD}.intValue() != 0) ||
((!$F{STATUS_NAME}.matches("Approved" )) && $F{NTHRD}.intValue()!=0 && $F{HRDBOOKED}.intValue()==0))||
($F{NTHRD}.intValue()==0 && $F{HRDBOOKED}.intValue()==0)]]></printWhenExpression>
                    </reportElement>
                </rectangle>
                <rectangle>
                    <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="580" y="130" width="270" height="60" backcolor="#FF0000" uuid="c3dd3981-91e5-496a-aa2e-b737af54ca55">
                        <printWhenExpression><![CDATA[!$F{STATUS_NAME}.matches( "Approved" ) && $F{HRDBOOKED}.intValue()>=1]]></printWhenExpression>
                    </reportElement>
                </rectangle>
                <textField isStretchWithOverflow="true" isBlankWhenNull="true">
                    <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="580" y="130" width="270" height="60" uuid="5aaf2362-76d8-4e4d-9542-78fe145f92e9">
                        <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                    </reportElement>
                    <box>
                        <topPen lineWidth="1.0"/>
                        <leftPen lineWidth="1.0"/>
                        <bottomPen lineWidth="1.0"/>
                        <rightPen lineWidth="1.0"/>
                    </box>
                    <textElement textAlignment="Center" verticalAlignment="Middle">
                        <font fontName="Arial" isBold="true"/>
                    </textElement>
                    <textFieldExpression><![CDATA[$F{STATUS_NAME}]]></textFieldExpression>
                </textField>

 

Thanks

-Venkitta

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...