Announcements
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
Thank you Ragoza. This Works Perfect.
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.
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();
}
Any suggestion?
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.
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?
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).
André Arnaud de Cal...
294,221
Super User 2025 Season 1
Martin Dráb
232,982
Most Valuable Professional
nmaenpaa
101,158
Moderator