Databand Lines with different number of decimal digits

Stimulsoft Reports.JS discussion
Post Reply
jimyWeb
Posts: 42
Joined: Wed Feb 03, 2016 8:08 am

Databand Lines with different number of decimal digits

Post by jimyWeb »

Hello,
I have a databand with a data column. This column is numeric. In some cases (depends of currency) i want to show 2 decimales and in others i want show 0 decimals. How Can I do this?

Example: GBP, USD, EUR = 2 decimals; CLP, JPY = 0 decimals
Money | Cost
GBP | 9,00
USD | 12,34
EUR | 10,20
CLP | 5230
JPY | 6084

Thank you very much.
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Re: Databand Lines with different number of decimal digits

Post by Jan »

Hello,

You can use the following trick:

-place two text boxes at the same place - one with two decimal formatting and one with one decimal formatting;
-set property Enabled to false for both textboxes;
-add condition with the help of the Conditions property of their text boxes. One condition for the first text box which enable this text box visiblity if current equal to GBP or USD or EUR. Second condition to the CLP or JPY currencies.

Please check attached image and report.

Thank you.
Attachments
Report.mrt
(16.46 KiB) Downloaded 335 times
Sample.png
Sample.png (325.24 KiB) Viewed 2795 times
Post Reply