Skip to content

Commit

Permalink
[fix] "Format specifier was invalid" exception on exporting aggregate…
Browse files Browse the repository at this point in the history
…d date/time values to PDF
  • Loading branch information
Sergiy Korzh committed Jan 11, 2024
1 parent b941fa7 commit fe884f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion easydata.net/src/EasyData.Exporters.PdfSharp/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public static string GetFormattedValue(object val, DataType dataType, IDataExpor
var format = BuildShortDateTimeFormat(settings.Culture, dataType);
return dt.ToString(format, CultureInfo.InvariantCulture);
}
else if (val is float || val is double || val is int || val is decimal) {
else if (DataTypeList.RangeDataTypes.Contains(dataType) && (val is float || val is double || val is int || val is decimal)) {
if (!string.IsNullOrEmpty(displayFormat))
return string.Format(settings.Culture, displayFormat, val);

Expand Down

0 comments on commit fe884f0

Please sign in to comment.