Bug with variables
Publicado: Mar Abr 14, 2020 10:41 pm
We are using one variable as coefficient for some calculations. We are encountering a bug if number has decimals.
On HB side we have this:
on FR side, we have this:
The issue is that variables in FR are exclusively strings. And our 0.65 gets converted to 0,65 (if locale uses coma as decimal separator)
And then expresion on FR side raises exception, as it expects US/Pascal numbers (with decimal point) in field expresions
If we format 0.65 to string, and call AddVariable() -> FRX wil add quotes: '0.65' and that also will not work in expresions.
We need a way to format our own string and send it to FR without quotes.
Is there any way we could do this?
On HB side we have this:
Código: Seleccionar todo
nBol := 0.65
oFR:AddVariable("_BOL", nBol)
Código: Seleccionar todo
[<SomeField>*<_BOL>]
And then expresion on FR side raises exception, as it expects US/Pascal numbers (with decimal point) in field expresions
If we format 0.65 to string, and call AddVariable() -> FRX wil add quotes: '0.65' and that also will not work in expresions.
We need a way to format our own string and send it to FR without quotes.
Is there any way we could do this?