mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-01 03:13:07 +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;
|
||||
fmtNumber:
|
||||
begin
|
||||
DecimalSeparator := Chr(AFormat and $FF);
|
||||
case f2 of
|
||||
0: Result := FormatFloat('###.##', 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);
|
||||
if not VarIsNumeric(v) then
|
||||
result := v
|
||||
else begin
|
||||
DecimalSeparator := Chr(AFormat and $FF);
|
||||
case f2 of
|
||||
0: Result := FormatFloat('###.##', 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;
|
||||
fmtDate:
|
||||
|
Loading…
Reference in New Issue
Block a user