Skip to main content

Notifications

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,199

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

  • oysbr Profile Picture
    on at
    RE: How to set SSRS language in the data provider class

    Thank you Ragoza. This Works Perfect.

  • Martin Dráb Profile Picture
    232,982 Most Valuable Professional on at
    RE: How to set SSRS language in the data provider class

    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.

  • Suggested answer
    Ragoza Oleksandr Profile Picture
    735 on at
    RE: How to set SSRS language in the data provider class

    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();

    }

  • Abhinay Tharwal Profile Picture
    1,199 on at
    RE: How to set SSRS language in the data provider class

    Any suggestion?

  • Abhinay Tharwal Profile Picture
    1,199 on at
    RE: How to set SSRS language in the data provider class

    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.

  • Iulian Cordobin Profile Picture
    8,201 on at
    RE: How to set SSRS language in the data provider class

    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?

  • Suggested answer
    Iulian Cordobin Profile Picture
    8,201 on at
    RE: How to set SSRS language in the data provider class

    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).

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,221 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,982 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans