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

Conditional style for Currency format


kunkasurendra

Recommended Posts

Hi All,

I have a problem while implementing the Conditional styles on Currecy formats.

I need to apply the Conditional Currency Styles based on conditions.

I have created one Text field with BigDecimal. I need to apply the Conditional Currency style on the TextField based on the conditions.

If PRM_REPORT_TYPE = TA , I need to display the Amount field with currency format.

If PRM_REPORT_TYPE = TC , I don't need to display any currency format.

I have created the style as i mentioned in below.

It is working only for fonts.

Could you please help in to resole the issue.

 

 

Thanks.

 

Code:
<style name="AmtStyle" isDefault="true" pattern="¤ #,##0.00" fontSize="12">  <conditionalStyle>   <conditionExpression><![CDATA[new Boolean($P{PRM_REPORT_TYPE}.equals("TC"))]]></conditionExpression>   <style isDefault="false" style="AmtStyle" mode="Opaque" pattern="¤ #,##0.00" fontSize="8"/>  </conditionalStyle>  <conditionalStyle>   <conditionExpression><![CDATA[$P{PRM_REPORT_TYPE} == "TC"]]></conditionExpression>   <style isDefault="false" style="AmtStyle" mode="Opaque" pattern="¤ #,##0.00" fontSize="12"/>  </conditionalStyle> </style>
Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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