AX 2012 SSRS report specific language

Question Status

Verified
Benoit Cyr asked a question on 26 Sep 2013 11:24 AM

Hi,

I want to create an SSRS report that is based on the client language, sometime the ourput  will be in french and some time in English.

I am using a DP class whit a contract class and a controller class that extends SrsReportRunController.

 

The report receives the table projInvoiceTable so I will have to do a select to get the specific lanquage.

 

Thanks .

Reply
venkatesh vadlamani responded on 26 Sep 2013 1:22 PM

set the current session language and set the rendering language of the report in Controller .

Check if this works

controllerobj.parmReportContract().parmRdlCOntract().parmLanguageID('Language ID you want ')

before calling the report 's start operation method.

this is actuallu passed to your report from the client during the execution.

You need to create labels used in the report in all languages and also have to add this to static designs present in report deployment settings and enable it and deploy it.

By default ax has some 12 or 13 reports that have multiple languages enabled.

FreeTextInvoice

VendorInvoiceDocument

etc

Hope this helps

Reply
Benoit Cyr responded on 27 Sep 2013 6:53 AM

Thanks for your reply Vankatesh,

I tried putting this line ,

this.parmReportContract().parmRdlContract().parmLanguageId('fr-ca');

Everywhere in the controler , I put it preRunModifyContrat, main, RunPrintMgmt  but it doesn't work, of course i created labels in the report but they are always translate in the "en-ca" wich is the user language.

I look at the others reports like FreeTxtInvocie and they all extends some kind of FormLetterController and they all use this line

formLetterReport.loadPrintSettings(custInvoiceJour, custInvoiceTable, custInvoiceJour.LanguageId);

with the previous line.

My report extend SrsReportRunController is this why it doesnt work?

Thanks for helping me.

Reply
venkatesh vadlamani responded on 27 Sep 2013 12:42 PM

These reports have static design's.

In report deployment Settings under tools>BiTools  you add your report and then deploy the report again

This will deploy the report resource files for the same will be added for all the languages.I guess this should do

Reply
Verified Answer
Benoit Cyr responded on 30 Sep 2013 6:49 AM

I finally put the code you provided me in the build method of the builder class and it work

Thanks for your help Venkatesh

Reply
Verified Answer
Benoit Cyr responded on 30 Sep 2013 6:49 AM

I finally put the code you provided me in the build method of the builder class and it work

Thanks for your help Venkatesh

Reply