FAQ/Questions/Add-Formatting-Options.md
... ...
@@ -61,12 +61,12 @@ _**Note:** You can use this as a template and any other format that requires a b
61 61
62 62
```csharp
63 63
[Serializable]
64
- public class DatesCustomFormatFormatter : IFormatter {
65
- public Type GetOutputDataType(DataTable table, int columnNumber, ReportOutputOptions reportOutputOptions, Field field) {
64
+ public class DatesCustomFormatFormatter : BaseFormatter {
65
+ public override Type GetOutputDataType(AdHocDataTable table, int columnNumber, ReportOutputOptions reportOutputOptions, Field field) {
66 66
return typeof(string);
67 67
}
68 68
69
- public object Format(DataTable table, int rowNumber, int columnNumber, Field field, DataTable originalTable, Field nameField) {
69
+ public override object Format(AdHocDataTable table, int rowNumber, int columnNumber, Field field, AdHocDataTable originalTable, Field nameField) {
70 70
object value = table.Rows[rowNumber][columnNumber];
71 71
if (value == null || Convert.IsDBNull(value))
72 72
return null;
... ...
@@ -77,7 +77,7 @@ _**Note:** You can use this as a template and any other format that requires a b
77 77
}
78 78
}
79 79
80
- public class DatesCustomFormat : IFormat {
80
+ public class DatesCustomFormat : BaseFormat {
81 81
private SqlTypeGroupCollection allowedTypeGroups = new SqlTypeGroupCollection();
82 82
public SqlTypeGroupCollection AllowedTypeGroups {
83 83
get { return allowedTypeGroups; }
... ...
@@ -97,8 +97,8 @@ _**Note:** You can use this as a template and any other format that requires a b
97 97
get { return true; }
98 98
}
99 99
100
- public IFormatter[] CreateFormatters() {
101
- return new IFormatter[] { new DatesCustomFormatFormatter() };
100
+ public BaseFormatter[] CreateFormatters() {
101
+ return new BaseFormatter[] { new DatesCustomFormatFormatter() };
102 102
}
103 103
104 104
public DatesCustomFormat(string name) {