Another language in Data Composition System

This forum is intended for cases when a problem can not be solved due to restrictions of the platform: a bug or lack of functionality.

#1
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Sep 19, 2014
Company: FirstBit Dubai

Hello!
The configuration uses multiple languages. You need to add the ability for the user to generate reports in the DCS in the selected language. In this case, the report generation language will differ from the current configuration and user language.

Using the LanguageCode property for a SpreadsheetDocument does not produce the desired results.
Is it technically possible for the platform to implement this requirement?
Platform version 8.3.17

 
#2
People who like this:0Yes/0No
Administrator
Rating: 7
Joined: Oct 3, 2019
Company:

Hello Igor,

no such problem was found on the 8.3.17.1549 platform. Please clarify in what configuration you're working? Also please email a sample source code where the error occurs.

Best regards,
Aleksandr

 
#3
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Sep 19, 2014
Company: FirstBit Dubai

I create new configuration at platform 8.3.17.1549
Add objects:
- two languages
- one catalog
- one report

I add this code in object module in report

Code
Procedure OnComposeResult(ResultDocument, DetailsData, StandardProcessing)
   ResultDocument.LanguageCode = "ru";
EndProcedure


As a result, I don't get russian headers under english user.
What am I doing wrong?

 
#4
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Sep 19, 2014
Company: FirstBit Dubai

If I add this code, I don't get result

Code
Procedure OnComposeResult(ResultDocument, DetailsData, StandardProcessing)
   
   ResultDocument.LanguageCode = "ru";
   
   StandardProcessing = False;
   
   Settings = ThisObject.SettingsComposer.GetSettings();
   UserSettings = ThisObject.SettingsComposer.UserSettings;
   
   TemplateComposer = New DataCompositionTemplateComposer;
   CompositionTemplate = TemplateComposer.Execute(ThisObject.DataCompositionSchema, Settings, DetailsData);
   
   CompositionProcessor = New DataCompositionProcessor;
   CompositionProcessor.Initialize(CompositionTemplate,, DetailsData, True);
   
   OutputProcessor = New DataCompositionResultSpreadsheetDocumentOutputProcessor;
   OutputProcessor.SetDocument(ResultDocument);
   
   OutputProcessor.BeginOutput();
   
   ResultItem = CompositionProcessor.Next();
   While ResultItem <> Undefined Do
      OutputProcessor.OutputItem(ResultItem);
      ResultItem = CompositionProcessor.Next();
   EndDo;

   OutputProcessor.EndOutput();
   
   ResultDocument.LanguageCode = "ru";
   
EndProcedure


Under the English user, I still get English headers
And only russian user, I get russian headers

 
Subscribe
Be the first to know tips & trick on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.