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

How delete backcolor property from JasperStudio interface?


sanbez
Go to solution Solved by narcism,

Recommended Posts

Hi, All

Conditional style don't work when report element contain backcolor attribute.
Little duscussion here https://community.jaspersoft.com/questions/1042866/background-color-conditional-style-doesnt-drawn

I can't find method delete backcolor attribute in report element from JasperStudio 6.4.0 using only UI
When I delete it from bookmark "Source" then Studio can't show report in Design mode.
After closing and reopening report Studio work fine.
I have many fields in report so it is not so pleasure to close and reopen report after any changes.

How I can delete backcolor from Studio UI ?

Part of jrxml

    <style name="temperatureInput" pattern="###0.00" fontSize="12">
        <box>
            <pen lineWidth="0.5"/>
            <topPen lineWidth="0.5"/>
            <leftPen lineWidth="0.5"/>
            <bottomPen lineWidth="0.5"/>
            <rightPen lineWidth="0.5"/>
        </box>
        <conditionalStyle>
            <conditionExpression><![CDATA[$F{temperature_input}.getHole() == 0]]></conditionExpression>
            <style mode="Transparent" forecolor="#000000" isBlankWhenNull="false"/>
        </conditionalStyle>
        <conditionalStyle>
            <conditionExpression><![CDATA[$F{temperature_input}.getHole() != 0]]></conditionExpression>
            <style mode="Opaque" forecolor="#000000" backcolor="#FFFF00" isBlankWhenNull="false"/>
        </conditionalStyle>
    </style>
...

                            <jr:detailCell height="20">
                                <textField pattern="" isBlankWhenNull="true">
                                    <reportElement style="temperatureInput" mode="Opaque" x="0" y="0" width="60" height="20" backcolor="#FFFFFF" uuid="ee2ee2fe-032c-4b60-8fc1-807e9a9500e7"/>
                                    <box>
                                        <pen lineWidth="0.5"/>
                                        <topPen lineWidth="0.5"/>
                                        <leftPen lineWidth="0.5"/>
                                        <bottomPen lineWidth="0.5"/>
                                        <rightPen lineWidth="0.5"/>
                                    </box>
                                    <textElement textAlignment="Right" verticalAlignment="Middle" markup="none">
                                        <font fontName="DejaVu Sans" size="12"/>
                                    </textElement>
                                    <textFieldExpression><![CDATA[$F{temperature_input}.getValue()]]></textFieldExpression>
                                </textField>
                            </jr:detailCell>

 

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

  • Solution

I have recently discovered that right-clicking on the actual color box pops up a "Set to Null" menu that helps achieving what you are after. In fact right-clicking on other properties pops up menus with "Reset to Default" option in addition to the one above. Tested in JasperSoft Studio 6.4.0.

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