View Issue Details

IDProjectCategoryView StatusLast Update
0034213LazarusLazReportpublic2018-09-08 08:33
Reporternicola gorlandiAssigned ToJesus Reyes 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product VersionProduct Build 
Target Version1.10Fixed in Version1.9 (SVN) 
Summary0034213: issue 0029313 regressin
DescriptionIn case of formatfloat function is used in script and the extended parameter is equals to 0 lzreport went in error because null value is returned after the 0029313.

I suppose that even the other function that aspect a not null variant may have the same issue (e.g. formatdate).
Steps To ReproduceCreate a script as where field PREZZO is equals to 0
text:=[FORMATFLOAT('######', ["PREZZO"])];
Additional InformationIn order to solve it I change in lr_class in TfrStdFunctionLibrary.DoFunction as below:

Added in var declaration
  varValue:variant;
  extendedvalue:extended;
  valueVarType:TVarType;

Changing the 4 case in

    4:
      begin
        varValue :=frParser.Calc(p2);
        extendedvalue:=0;
        if not varIsNull(varValue) then
               begin
                 valueVarType := varType(varValue);
                 if (valueVarType=varSmallint)or
                     (valueVarType=varInteger) or
                     (valueVarType=varSingle) or
                     (valueVarType=varDouble) or
                     (valueVarType=varCurrency)
                     then extendedvalue:=varValue;
               end;


        val := FormatFloat(frParser.Calc(p1), extendedvalue ); //Add('FORMATFLOAT'); {4}
      end;
TagsNo tags attached.
Fixed in Revision58906
LazTarget1.10
Widgetset
Attached Files

Relationships

related to 0029313 closedJesus Reyes Packages Value zero is reset to Null when PrintChildIfNotVisible option is set in band 

Activities

Jesus Reyes

2018-09-08 08:33

developer   ~0110554

Applied an alternative change, please test.

Issue History

Date Modified Username Field Change
2018-09-02 08:19 nicola gorlandi New Issue
2018-09-02 11:06 Michael Van Canneyt Project FPC => Lazarus
2018-09-02 11:44 Juha Manninen Relationship added related to 0029313
2018-09-04 18:27 Juha Manninen Assigned To => Jesus Reyes
2018-09-04 18:27 Juha Manninen Status new => assigned
2018-09-08 08:33 Jesus Reyes Fixed in Revision => 58906
2018-09-08 08:33 Jesus Reyes LazTarget => 1.10
2018-09-08 08:33 Jesus Reyes Note Added: 0110554
2018-09-08 08:33 Jesus Reyes Status assigned => resolved
2018-09-08 08:33 Jesus Reyes Fixed in Version => 1.9 (SVN)
2018-09-08 08:33 Jesus Reyes Resolution open => fixed
2018-09-08 08:33 Jesus Reyes Target Version => 1.10