Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » reportContext.getLocale()(Get substring )
reportContext.getLocale() [message #759053] Fri, 25 November 2011 15:41 Go to next message
JulioC Missing name is currently offline JulioC Missing name
Messages: 33
Registered: March 2011
Location: Ottawa, Canada
Member
Hi all

I have a report variable that I can grab only the fisrt two charaters to the result of
reportContext.getLocale() function
This is what I'm doing

var locale=reportContext.getLocale().substr(1,2)

That expression gives me this error
"Type error : Can not find function string in object en_CA "
en_CA is the result of reportContext.getLocale() function

I'm using Birt 2.6.2

However if I do something like this

var locale="en.CA".substr(1,2) it works (it returns "en")

What is the difference? the first one is a variable, the second one is just a string
Kind of rookie on this
Thanks in advance for your help



Re: reportContext.getLocale() [message #759055 is a reply to message #759053] Fri, 25 November 2011 15:48 Go to previous messageGo to next message
donino donino is currently offline donino donino
Messages: 162
Registered: July 2011
Senior Member
you should try with reportContext.getLocale().toString()
Re: reportContext.getLocale() [message #759434 is a reply to message #759055] Mon, 28 November 2011 11:23 Go to previous message
JulioC Missing name is currently offline JulioC Missing name
Messages: 33
Registered: March 2011
Location: Ottawa, Canada
Member
dpardon wrote on Fri, 25 November 2011 15:48
you should try with reportContext.getLocale().toString()

Hi dpardon

Thanks a lot for your reply that worked like a charm


Previous Topic:How to display how much resources BiRT is using to generate a report?
Next Topic:Integration with Active Directory?
Goto Forum:
  


Current Time: Sat Aug 30 04:44:41 EDT 2014

Powered by FUDForum. Page generated in 0.01568 seconds