vs00500773 Posted October 12, 2018 Share Posted October 12, 2018 When exporting to Doc or Excel there is no colour coding of the boxed to indicate the RAG and this works fine on PDF but not on these two formats. Any help or pointer is greatly appreciated Link to comment Share on other sites More sharing options...
hozawa Posted October 12, 2018 Share Posted October 12, 2018 I just tested with Jaspersoft Studio and colors were exported to xlsx without any problem. Link to comment Share on other sites More sharing options...
vs00500773 Posted October 13, 2018 Author Share Posted October 13, 2018 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 More sharing options...
hozawa Posted October 14, 2018 Share Posted October 14, 2018 Just test out. You only have backcolor in the first and second rectangle. Deleted the printWhenExpression and the exported xlsx had a green rectangle. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now