Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

working with different locale?

Status
Not open for further replies.

alvintse

Programmer
Aug 1, 2003
66
US
I have reports cresated with CR9 with US locale. Now my reprots need to run under different locale setting (Spanish)
My problem is:

For any date type record, if I use the cdate( ) before the data displays, it works perfectly with any locale.

For those number and currency datatype, the only time it works is when I formatted the field as default system setting. If I format the field with cutom setting, for example:

number: 1234567 with default system setting
-display 1,234,567.00 with US locale setting
-display 1.234.567,00 with Spanish locale setting
If I need to custom format the field with 3 decimal places, I have to specify the thousand separator with "," or "." too and the report will always display the data in this format no matter what locale your machine setting is.

Same problem with the currency datatype.

Does anybody deal with this problems before?

Thanks!
 
I have dealt with this, unfortunately I don't have an elegant solution.

If you need a default of 3 decimal characters than the report will have the have some means of knowing the local language.

You may be able to do this using a UFL, or perhaps even by returning the language from the database being used.

Otherwise the default will use the local default settings, which are generally 2 decimal places.

Another solution might be to prompt the user for the language and conditionally format based on that.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top