{"title":"Report.Language([Integer]) Method","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/report/reportinstance-language-method/","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/methods-auto/report/reportinstance-language-method, 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/methods-auto/report/reportinstance-language-method","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":"Gets or sets the current language setting for the report.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":1,"title":"Report.Language([Integer]) Method","slug":"reportlanguageinteger-method","at":0,"chars":3328},{"level":2,"title":"Syntax","slug":"syntax","at":154,"chars":146},{"level":2,"title":"Parameters","slug":"parameters","at":300,"chars":189},{"level":2,"title":"Return Value","slug":"return-value","at":489,"chars":125},{"level":2,"title":"Remarks","slug":"remarks","at":614,"chars":1571},{"level":2,"title":"Example","slug":"example","at":2185,"chars":789},{"level":2,"title":"Related information","slug":"related-information","at":2974,"chars":354}],"text":"# Report.Language([Integer]) Method\n> Version: _Available or changed with runtime version 1.0._\nGets or sets the current language setting for the report.\n## Syntax\n```al\n[CurrentLanguage := ]  Report.Language([Language: Integer])\n```\n> NOTE\n> This method can be invoked using property access syntax.\n## Parameters\nReport\nType: report-data-type\nAn instance of the report-data-type data type.\n*[Optional] Language*\nType: ../integer/integer-data-type\nThe new language setting for the report.\n## Return Value\n*[Optional] CurrentLanguage*\nType: ../integer/integer-data-type\nThe current language setting for the report.\n## Remarks\nThe Language integer parameter must point to a valid Windows Language Code Identifier (LCID). See Windows Language Code Identifier (LCID) Reference<https://learn.microsoft.com/openspecs/windows_protocols/ms-lcid/70feba9f-294e-491e-b6eb-56532684c37f>. The Language codeunit includes the GetLanguageId method that can safely return a valid LCID from a language code in the Language table. If you call Report.Language with an invalid LCID, then a runtime error occurs.\nIf you have reports that you want to print in the language of the recipient rather than in your own working language, you can add a single line of code in the report to handle this. This functionality is already enabled for most reports in the standard Business Central database. The document is printed in the language that's specified in the Language Code field on the Customer Card page.\nFor reports that need the multiple document languages functionality, you must insert the following AL code as the first line in the `OnAfterGetRecord()` trigger on the data item referencing the Customer table (notice that the feature isn't limited to the Customer table, other data sources provide similar functionality):\n`CurrReport.Language := LanguageMgmt.GetLanguageIdOrDefault(\"Language Code\");`\nFor each of these reports, you must create a new variable, LanguageMgmt, with the data type Codeunit pointing to the Language codeunit. When you have compiled the object, it'll no longer print in the user's working application language if another language has been specified on the Customer Card page.\n## Example\nThe following example illustrates how to use the Language codeunit to set the language defined on the customer card in a report. The example is based on report 10071 \"Customer Stmt. (Pre-Printed)\" from the base application.\n```al\nreport 10071 \"Customer Stmt. (Pre-Printed)\"\n{\n  // report properties\n\n  dataset\n  {\n    dataitem(Customer; Customer)\n    {\n      // data item fields and nested dataitems here\n\n      trigger OnAfterGetRecord()\n      begin\n        CurrReport.Language := LanguageMgt.GetLanguageIdOrDefault(\"Language Code\");\n        CurrReport.FormatRegion := LanguageMgt.GetFormatRegionOrDefault(\"Format Region\");\n\n        // maybe more code here\n      end;\n    }\n\n    // requestpage section\n\n    // rendering section\n\nvar\n    LanguageMgmt: Codeunit Language;\n}\n\n```\n## Related information\nWindows Language Code Identifier (LCID) Reference<https://learn.microsoft.com/openspecs/windows_protocols/ms-lcid/70feba9f-294e-491e-b6eb-56532684c37f>\nreportinstance-formatregion-method\n../../devenv-report-localization\nreport-data-type\nGet Started with AL<../../devenv-get-started>\nDeveloping Extensions<../../devenv-dev-overview>"}