From: Sheir on
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 a
report.

Clara
--
thank you so much for your help

Previous Posts In This Thread:

On Friday, December 21, 2007 11:31 AM
clar wrote:

Localization in Crystal Reports
Hi all,

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

Clara
--
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/tutorials/aspnet/56161e9e-7fa3-48e8-9dfe-9f7a28f4d58e/filebased-cache-for-web.aspx
From: Cor Ligthert[MVP] on
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

"Sheir Ali" wrote in message news:201032315813sheir(a)magma.ca...
> 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
> a
> report.
>
> Clara
> --
> thank you so much for your help
>
> Previous Posts In This Thread:
>
> On Friday, December 21, 2007 11:31 AM
> clar wrote:
>
> Localization in Crystal Reports
> Hi all,
>
> How to do localization to a Cystal Report? Especially to a Text Object in
> a
> report.
>
> Clara
> --
> 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/tutorials/aspnet/56161e9e-7fa3-48e8-9dfe-9f7a28f4d58e/filebased-cache-for-web.aspx