Localization in Crystal Reports

  • Thread starter Thread starter clara
  • Start date Start date
C

clara

Hi all,

How to do localization to a Cystal Report? Especially to a Text Object in a
report.

Clara
 
Found a way to for localization of values such as DateTimes in Crystal Reports.
For instance if date is Aug-2009 and culture is French then would display as ao?t-2009.
All this WITHOUT switching the current Thread culture to French.

Relevant Code snippet (example):


//Locale must be set BEFORE report is opened
if (this.IsEnglish)
{
ReportDoc.ReportClientDocument.PreferredViewingLocaleID =
CrystalDecisions.ReportAppServer.DataDefModel.CeLocale.ceLocaleEnglishCanada;
ReportDoc.ReportClientDocument.LocaleID =
CrystalDecisions.ReportAppServer.DataDefModel.CeLocale.ceLocaleEnglishCanada;
ReportDoc.ReportClientDocument.ProductLocaleID =
CrystalDecisions.ReportAppServer.DataDefModel.CeLocale.ceLocaleEnglishCanada;
}
else
{
ReportDoc.ReportClientDocument.PreferredViewingLocaleID =
CrystalDecisions.ReportAppServer.DataDefModel.CeLocale.ceLocaleFrenchCanada;
ReportDoc.ReportClientDocument.LocaleID =
CrystalDecisions.ReportAppServer.DataDefModel.CeLocale.ceLocaleFrenchCanada;
ReportDoc.ReportClientDocument.ProductLocaleID =
CrystalDecisions.ReportAppServer.DataDefModel.CeLocale.ceLocaleFrenchCanada;
}

//Load the report from file path
ReportDoc.Load(reportPath.ToString());




clar wrote:

Localization in Crystal Reports
21-Dec-07

Hi all

How to do localization to a Cystal Report? Especially to a Text Object in
report

Clar
-
thank you so much for your help

Previous Posts In This Thread:

Localization in Crystal Reports
Hi all

How to do localization to a Cystal Report? Especially to a Text Object in
report

Clar
-
thank you so much for your help


Submitted via EggHeadCafe - Software Developer Portal of Choice
File-Based Cache for Web and non-Web Apps plus Extend ASP.NET 4.0 OutputCacheProvider
http://www.eggheadcafe.com/tutorial...dfe-9f7a28f4d58e/filebased-cache-for-web.aspx
 
Hi Sheir,

I don't know anybody who likes to work with Crystal Reports (it is a good
product before you misunderstand me).

However, this is a Visual Basic newsgroup.

Your probably better of at the neighbor group, where C# is the language
which is used.

Almost same name as this one but then .CSharp

Cor

in message news:[email protected]...
 
Back
Top