{"title":"Formatting field values in report datasets","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/devenv-format-report-field-data/","by":"JOP-AL","license":"Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-format-report-field-data, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-format-report-field-data","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"Learn how to format data in report datasets.","date":"2023-12-01","meta":{"topic":"concept-article"},"outline":[{"level":1,"title":"Formatting field values in report datasets","slug":"formatting-field-values-in-report-datasets","at":0,"chars":4212},{"level":2,"title":"Formatting decimal values","slug":"formatting-decimal-values","at":598,"chars":616},{"level":2,"title":"Formatting date, boolean, and enum values","slug":"formatting-date-boolean-and-enum-values","at":1214,"chars":1532},{"level":3,"title":"Example","slug":"example","at":1801,"chars":945},{"level":2,"title":"Formatting captions, options, enums, and strings in Date/DateTime/Time strings","slug":"formatting-captions-options-enums-and-strings-in-datedatetimetime-strings","at":2746,"chars":636},{"level":2,"title":"Defining the regional format for Date/DateTime/Time and decimal values","slug":"defining-the-regional-format-for-datedatetimetime-and-decimal-values","at":3382,"chars":541},{"level":2,"title":"Related information","slug":"related-information","at":3923,"chars":289}],"text":"# Formatting field values in report datasets\nIt's often useful to format data in the report dataset to reduce the complexity of the report layout. For example, if a decimal field in a table has precision of five digits, the same level of precision might not be needed in the report. Or maybe you want to format dates or currencies in a different way in the report as they appear on the page in Business Central.\nIn this article, we explain\n how to format decimal values,\n how to format date, boolean, and enum values, and\n how to control regional formats for Date/DateTime/Time and decimal values.\n## Formatting decimal values\nWhen a field of type Decimal is defined on a table, it's possible to set the properties AutoFormatType and AutoFormatExpr to control how this field is shown on pages and reports. You can also change the precision using the DecimalPlaces property.\nIf you don't want to use the format defined on the field on the table, you can override these properties on the field in the dataset.\nFor more information about how to use AutoFormatType and AutoFormatExpr to override the formatting on table fields of type Decimal, see Formatting decimal values in report fields<devenv-format-field-data>.\n## Formatting date, boolean, and enum values\nAs described above, formatting of fields of type Decimal can be done using properties. But you might also want to format fields of other data types such as Date, Boolean, or Enum in your report dataset. To achieve this, you can simply use the Format method directly when specifying the field from the table in your dataitem columns. See an example below on how to do this.\nFor more information on how to use Format method for formatting dates, times, booleans, enums, and more, see Formatting values, dates, and time<devenv-format-property>.\n### Example\nThe following example illustrates, how to format field of type Date in the Customer table in the dataset of a report that builds on top of the Customer table.\nAssume that the Customer table has two fields `Last Date Modified` and `Prices Including VAT` of type Date and Boolean.\n```al\ntable 18 Customer\n{\n...\n\nfields\n    {\n        field(54; \"Last Date Modified\"; Date)\n        {\n        }\n        ...\n        field(82; \"Prices Including VAT\"; Boolean)\n        {\n        }\n    }\n}\n```\nWhen defining a report MyCustomerReport using data from the Customer table, you can format fields in the dataset using the Format method.\n```al\nreport 50143 MyCustomerReport\n{\n\n...\n\n    dataitem(CustomerDataItem; Customer)\n    {\n        ...\n        column(\"My Last Date Modified\"; Format(\"Last Date Modified\"))\n        {\n        }\n        column(\"Including VAT (Y/N)\"; Format(\"Prices Including VAT\"))\n        {\n        }\n        ...\n    }\n...\n}\n```\n## Formatting captions, options, enums, and strings in Date/DateTime/Time strings\nIt's possible to control the language to use for application captions, options, enums, and strings in Date/DateTime/Time strings by using the Language method on the report object. This value determines the localizations that are used for formatting period names like day name, month name, and so forth.\nFor more information on how to use the Language method on the report object for formatting captions, options, enums, and strings in Date/DateTime/Time strings, see Localizing the report data formatting and caption strings<devenv-report-localization>.\n## Defining the regional format for Date/DateTime/Time and decimal values\nSimilar to the ability to control the language of the report using the Language method, it's also possible to control the regional format on Date/DateTime/Time and decimal values. You can achieve this by using the report method FormatRegion.\nFor more information on how to use the FormatRegion method on the report object for formatting Date/DateTime/Time and decimal values, see Localizing the report data formatting and caption strings<devenv-report-localization>.\n## Related information\nFormatting decimal values in report fields<devenv-format-field-data>\nLocalizing the report data formatting and caption strings<devenv-report-localization>\nDefining a report dataset<devenv-report-dataset>\ndevenv-report-design-overview\nReports Overview<devenv-reports>"}