Issue in the .r file.

Posted by suhail.anjum on 28-Mar-2018 10:04

Hi Everyone,

I am running a report. it prints in English when fetch the code from the .r path and print in French when fetch the code from the .p path .

Both .p and .r having same code. 

I need the report in the french and also choosing the option "French".

Am I missing something during compilation for the .p to generate the .r file .

Thanks in Advance.

Thanks,

Suhail 

All Replies

Posted by Robin Brown on 28-Mar-2018 14:18

Only compiled .r files support multiple languages.  It looks like your default language is French given that is what you get when running the .p.  You need to compile the  .r with the LANGUAGES option, and set CURRENT-LANGUAGE (French or English) at run time using the CURRENT-LANGUAGE statement.

Posted by suhail.anjum on 29-Mar-2018 07:54

I am sorry. I might not be clear in my question. I am rephrasing my question.

My requirement is to run a report in french or English depending upon the run time parameter.

I have set current-language = language chosen by user. Let say "french".

Now when I run a .p then it prints in french or English what ever language I choose from front-end. But when I run a .r code of same .p then it does not print in french. Do I need to compile the code in some special way?

Posted by Stefan Drissen on 30-Mar-2018 00:23

How are the translations being provided when running the .p?

If a translat database is connected then you need to connect to that when compiling and also use the languages option.

Posted by Torben on 09-Apr-2018 05:06

There is a limitation with Langauge in r-codes.

Only one language is loaded to memory at a time.

So if xxx.r is already loaded (persistent) with French, then it can not in same session be loaded with English, before the French version is un-loaded.

So all persistent procedure instansces of xxx needs to be deleted.

All objects from xxx class needs to be deleted.

This limitation means that Language can not be changed for static classes. (Or any object instantiated from these classes)

This thread is closed