web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to set SSRS language in the data provider class

(0) ShareShare
ReportReport
Posted on by 1,215

Hi,

I am aware of this.parmReportContract().parmRdlContract().parmLanguageId(language-id) code to change the language of the report. But, I have seen this code only in the controller class's prePromptModifyContract() method.

I have a scenario where the language of the report needs to be determined in the data process class (DP class) of the report. How can I specify the language in the DP class processReport() method?

Regards,

Abhinay

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Iulian Cordobin Profile Picture
    8,201 on at

    So you basically want to change the language after starting the execution of the report, at the time you are loading the data? I think that the labels are already loaded for the report design at that point in time (I mean you would be able to set the languageId on the contract, since you actually get it in your DP class, but, I don't think it will make any difference).

  • Iulian Cordobin Profile Picture
    8,201 on at

    Actually I just realized, the language is set (of course) in the RDL contract, not the RDP, so actually you do not get the reference you need to see the data.

    So, the question would be, aren't you able to do some pre-processing to actually determine ahead the language in the controller?

  • Abhinay Tharwal Profile Picture
    1,215 on at

    That's the issue, I can't. I will have to pre-execute the same code which will reduce the performance, which is just out of question. Cannot stick to one language as with some of the X++ reports that was implemented successfully, and client will not accept the limitation of SSRS over X++ reports.

  • Abhinay Tharwal Profile Picture
    1,215 on at

    Any suggestion?

  • Suggested answer
    Ragoza Oleksandr Profile Picture
    735 on at

    Hi Abhinay,

    I have overridden the run() method of my controller with such code:

    public void run()

    {

       My_SSRS_CustTransOpenContract   dataContract;

       LanguageIdAll                   langId;

       dataContract = this.parmReportContract().parmRdpContract();

       langId = dataContract.parmReportLanguageId();

       this.parmReportContract().parmRdlContract().parmLanguageId(langId);

       super();

    }

  • Martin Dráb Profile Picture
    237,878 Most Valuable Professional on at

    You can fetch data from database in another language in your RDP class, but you can't change labels etc., because that's not the responsibility of RDP classes. The report is already constructed (with a particular language) when it asks datasources (such as your RDP) class for the data and it get a table with data and nothing else.

    In other words, it's impossible and it doesn't make sense.

    Can you please explain again what business problem are you trying to address? It's not clear to me.

  • oysbr Profile Picture
    on at

    Thank you Ragoza. This Works Perfect.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
Ali Zaidi Profile Picture

Ali Zaidi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans