COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: nayitian on 27 Jan 2012 02:07:58 PM

Title: Retrieve user locale
Post by: nayitian on 27 Jan 2012 02:07:58 PM
Hi

I am trying so hard to add a query item, which can retrieve user's locale information(en, fr...), it's going to be used as an individual reporting column. Can any one shed some lights on how to do it, or if it's even possible to do.

Thank you.
Title: Re: Retrieve user locale
Post by: Grim on 27 Jan 2012 02:13:33 PM
See if this helps:
http://publib.boulder.ibm.com/infocenter/cbi/v10r1m1
/index.jsp?topic=%2Fcom.ibm.swg.ba.cognos.c8pp_inst.10.1.1.doc%2Fc_map_contl.html

Edit:
Other finds...

http://www-01.ibm.com/support/docview.wss?uid=swg21340429

http://publib.boulder.ibm.com/infocenter/cbi/v10r1m1/index.jsp?topic=%2Fcom.ibm.swg.ba.cognos.ug_fm.10.1.1.doc%2Fc_use_parameters_model_multilingual_data.html
Title: Re: Retrieve user locale
Post by: nayitian on 27 Jan 2012 02:29:12 PM
Hi Grim

Thank you for such quick help.
However, it won't work. In FM model, I can run the Macro the retrieve user locale, but I cannot use it as a query item.
Title: Re: Retrieve user locale
Post by: blom0344 on 30 Jan 2012 03:16:05 AM
You can use the the locale within case expressions to translate codes to multilingual output:

Use the syntax:

# sq( $runLocale)#

Example:

case when
(# sq( $runLocale)# = 'en') then 'bubblegum'
else 'liquorice'
end
Title: Re: Retrieve user locale
Post by: nayitian on 30 Jan 2012 07:35:06 AM
Awsome!  Thank you soooo much. You literally saved my life.