How to make separator decimal currency in Report Creatio

Hi All, question please.

I want to make a currency field in my report using separator decimal.

I already follow this instruction :
https://customerfx.com/article/creating-custom-macros-to-format-values-in-word-printables-for-creatio-formerly-bpmonline/

 

 namespace Terrasoft.Configuration
{
   using System;
   using Terrasoft.Common;
   using Terrasoft.Core;
   using Terrasoft.Core.DB;
   using Terrasoft.Core.Entities;
   using Terrasoft.Core.Packages;
   using Terrasoft.Core.Factories;
   using System.Globalization;
     
   [ExpressionConverterAttribute("Money")]
   public class UsrMoneyConverter : IExpressionConverter
   {
       public string Evaluate(object value, string arguments = "") 
       {
           var result = string.Empty;
           if (value != null)
           {
               result = value.ToString();
               double currency;
               if (Double.TryParse(result, out currency))
               {
                   result = number.Format("{0:n}");
               }
           }
           return result;
       }
   }
}

 

Also, I already tried using :

result = currency.ToString("C", new CultureInfo("en-US"));
 

The result always have this error and the report still not have separator currency decimal :

Need advice please.

Thank you.

Like 0

Like

0 comments
Show all comments