Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » reportContext.getLocale()(Get substring )
reportContext.getLocale() [message #759053] Fri, 25 November 2011 20:41 Go to next message
JulioC Missing name is currently offline JulioC Missing nameFriend
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 20:48 Go to previous messageGo to next message
donino donino is currently offline donino doninoFriend
Messages: 183
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 16:23 Go to previous message
JulioC Missing name is currently offline JulioC Missing nameFriend
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: Thu Mar 28 09:42:09 GMT 2024

Powered by FUDForum. Page generated in 0.02690 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top