I want change the language of a report, before then 22.1 version of BC I use this code
Lenguaje.SETRANGE(Lenguaje."Abbreviated Name", customer."Language Code");
IF Lenguaje.FIND('-') THEN begin
CurrReport.LANGUAGE := Lenguaje."Language ID";
end;
This code worked but when BC updated to 22.1 the code not work. CurrReport.LANGUAGE always take te¡he value that my web client language have assigned to it.
Example
If I assign to CurrReport.Language the value 1033 which is the code for the English language.
CurrReport.Language := 1033
When reviewing the value of CurrReport.Language it shows us that the value is 2858 which is Spanish and is the language in which the BC client is configured.
Note: I have also tried to use CurrReport.LANGUAGE := LanguageCodeunit.GetLanguageIdOrDefault(CustomerInfo."LanguageCode").