Hi,
I have a decimal input, I need to format this number on the report in a way, that value 25.5 will display as 25.50, -25.5 will display as (25.50) and zero will display as "-" (simple dash).
usually I would format this number with format string "f2;(f2);-" but that doesn't seem to work in your control.
Any suggestions?
number formating
number formating
Please use the following expression in the Text property of the StiText component:
In the case of the DataColumn with the decimal type:
In the case of the column with the string type:
Thank you.
In the case of the DataColumn with the decimal type:
Code: Select all
{MyDataSource.MyDataColumn.ToString(“#0.00;(#0.00);-“)}
Code: Select all
{decimal.Parse(MyDataSource.MyDataColumn).ToString(“#0.00;(#0.00);-“)}
number formating
thanks a lot. that makes perfect sense, I had no idea I can use .NET methods on my variables in your designer. anyway, that makes whole thing a lot more flexible.
problem solved, thanks again
problem solved, thanks again
number formating
Please contact us if you need any help.
Thank you.
Thank you.