Skip to Content
Technical Articles

Dynamically changing Amount format based on Currency Type in SAP Web Intelligence 4.2 Support Package 5

Introduction:

There are certain conditions where we would need to adjust the decimal places dynamically for the Amount field based upon the Currency type. I have discussed the solution for this problem in this blog post.

Main Problem:

As per the requirement of my customer I had been asked to dynamically change the Decimal Places of Amount field displayed in a report based upon the Currency Type. By default, for all currency types the amount is displayed with two decimal places. But for the Currency type OMR, the amount needs to be displayed with three decimal places. I have attached the Screenshot of my problem below:

 

Solution:

I have mentioned the solution for this problem in the below steps:

  1. Open the WEBI report in Design mode. Go to ‘Analysis’ tab → ‘Conditional’ sub tab → ‘New Rule…’. It will open the Formatting Rule Editor.

2. In Formatting Rule Editor, enter the Name, Description and select the Variable for which the Condition needs to be applied and enter the Condition.

3. Now click on format to give the formatting rule for the above condition. Click on Custom in Display option of Formatting Rules Dialog Box.

4. Now, enter the Three decimal Custom format, click Add and select OK.

5. Select the column ‘Amount’ on which the formatting rule is to be applied. In Formatting Rules select the rule to be applied.

6. Now Amount is displayed with the required decimal places depending on currency type.

Thus, the problem is rectified.

Conclusion:

So, from this blog post you could have got an idea on how to format amount to the required decimal places for the respective currency type dynamically. Kindly post your comments and feedback about this blog post.

Reference:

 

Be the first to leave a comment
You must be Logged on to comment or reply to a post.