Decimal separator problem

DomiDomi Belgium
edited 10:34PM in FastReport .NET
Hi,

I have a problem with the decimal separator.
I send data as string and all the number fields have a point as the decimal separator : "123.45"; in fastreport I use the conversion function to get these data as Decimal; on a UK windows, this works fine but
on other computer with use a comma as separator (FR for example), all is multiply by 100 which is normal and logical ! therefore my question is : is there a way (parameter when I call the report) to force fastreport to
use the point on all version of windows regardless the local windows settings ? for a whole report, I don't want to do this for each field.

Thanks in advance,
sincerly,
Domi.

Comments

  • Hello!

    Pass these fields to the DataTable or business object directly as `decimal` or `double` (or change the data type of the columns in the source before passing them to the report), rather than as strings

    If it’s not possible to change the column type: before calling report.Prepare() (in a separate thread or using block), temporarily set CultureInfo.CurrentCulture = CultureInfo.InvariantCulture (or, if you only want to change the parsing rules within a single report, pass CultureInfo.InvariantCulture to Convert.ToDecimal([Field], System.Globalization.CultureInfo.InvariantCulture))

This discussion has been closed.