mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-07 22:59:37 +02:00
LazReport, only format numeric values if they are really numeric
git-svn-id: trunk@43466 -
This commit is contained in:
parent
b5772a5157
commit
47ecbcc2d8
@ -8831,13 +8831,17 @@ begin
|
|||||||
end;
|
end;
|
||||||
fmtNumber:
|
fmtNumber:
|
||||||
begin
|
begin
|
||||||
DecimalSeparator := Chr(AFormat and $FF);
|
if not VarIsNumeric(v) then
|
||||||
case f2 of
|
result := v
|
||||||
0: Result := FormatFloat('###.##', v);
|
else begin
|
||||||
1: Result := FloatToStrF(Extended(v), ffFixed, 15, (AFormat div $0100) and $FF);
|
DecimalSeparator := Chr(AFormat and $FF);
|
||||||
2: Result := FormatFloat('#,###.##', v);
|
case f2 of
|
||||||
3: Result := FloatToStrF(Extended(v), ffNumber, 15, (AFormat div $0100) and $FF);
|
0: Result := FormatFloat('###.##', v);
|
||||||
4: Result := FormatFloat(AFormatStr, v);
|
1: Result := FloatToStrF(Extended(v), ffFixed, 15, (AFormat div $0100) and $FF);
|
||||||
|
2: Result := FormatFloat('#,###.##', v);
|
||||||
|
3: Result := FloatToStrF(Extended(v), ffNumber, 15, (AFormat div $0100) and $FF);
|
||||||
|
4: Result := FormatFloat(AFormatStr, v);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
fmtDate:
|
fmtDate:
|
||||||
|
Loading…
Reference in New Issue
Block a user