TppSearchValueList.SetSearchExpressionForNumeric(const aSearchExpression: string);
Hello,
autosearch values for between fields in our reports goes well utils we moves
to RB12
Our clients now getting error of SQL when they have a different regional
settings.
As far I can see, this function in the lines
lsValue := StringReplace(Self[liIndex],'"','',[rfReplaceAll]);
lsValue := ppRemoveCharacter(ppFormatSettings.ThousandSeparator,
lsValue);
lsValue := StringReplace(lsValue,
ppFormatSettings.DecimalSeparator, '.', []);
is making the error. for example with two values of 100 and 120
depends on configuration it can resolve "100120" or "100(decimal
separator)12" and in this case the count is not 2 values but just 1. Then
when the reports want to set up the condicion the function ResolveOperand
fails at lines
if (lValues.Count = 2) then
lsValue := FormatValue(lValues[0]) + ' AND ' +
FormatValue(lValues[1])
else
lsValue := '';
and the result for the between is empty string that cause the SQL to fails.
My impression is that put the values in a commatext is causing this
situation.
well thats all my investigation, now please tell me you have a patch for
this![:) :)](https://digital-metaphors.com/forums/resources/emoji/smile.png)
autosearch values for between fields in our reports goes well utils we moves
to RB12
Our clients now getting error of SQL when they have a different regional
settings.
As far I can see, this function in the lines
lsValue := StringReplace(Self[liIndex],'"','',[rfReplaceAll]);
lsValue := ppRemoveCharacter(ppFormatSettings.ThousandSeparator,
lsValue);
lsValue := StringReplace(lsValue,
ppFormatSettings.DecimalSeparator, '.', []);
is making the error. for example with two values of 100 and 120
depends on configuration it can resolve "100120" or "100(decimal
separator)12" and in this case the count is not 2 values but just 1. Then
when the reports want to set up the condicion the function ResolveOperand
fails at lines
if (lValues.Count = 2) then
lsValue := FormatValue(lValues[0]) + ' AND ' +
FormatValue(lValues[1])
else
lsValue := '';
and the result for the between is empty string that cause the SQL to fails.
My impression is that put the values in a commatext is causing this
situation.
well thats all my investigation, now please tell me you have a patch for
this
![:) :)](https://digital-metaphors.com/forums/resources/emoji/smile.png)
This discussion has been closed.
Comments
are not using RB 12.04, please update and retest. If you need RB 12.04
download info, please send serial number and registration details to info@
and request it.
-
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
supply steps to reproduce, including which regional settings to use in
testing. Send in zip format to support@ and we can check it out here in the
debugger.
-
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
it?
thank you
I found one small issue with the example project that you sent. For my test
I use Windows 7. I change the Windows format settings to Spanish
(Argentina). This results in the decimal; separator being a comma.
I changed the following of line of code in the demo, so that the search
field value is initialized properly. Notice the parameter just after the
soBetween, has quotes around each of the values.
lAutoSearchField := ppReport1.CreateAutoSearchField('', 'AmountPaid',
'Amount Paid', dtCurrency, soBetween, '"0","10000"', True);
Try making that change and the example should work properly.
-
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com