Localized Crystal Reports

What is a good label localization method (column headings, field labels, headers and footers, etc.) in Crystal Reports?

We are currently on XI R2 SP4, but plan to move to 2008. It seems that 2008 offers the best localization of the viewer's user interface. Does this have a history of localizing content?

+5
source share
5 answers

The two options I can think of are the following: 1) Have a separate report for each localized version (this gets terribly fast, and I don't recommend it very much) or 2) Create a report from the application (say aC # windows / web app ), and then you can localize using .net localization standards and set all localized text (read from resource files) in the code.

I am not sure in 2008, but we are also on XI R2. We have localized reports for each language, but only because we * know * that we only need three different localized versions.

+2
source

, DateTimes Crystal Reports.
, -2009, - , août-2009.
.

():

            //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());
+2

, . Crystal Reports / , . , , , .

, API Crystal Reports (2008 - RDC) .

- .resx . - , " ".

, resx , resx . MS Gothic, "" . "" (, Arial Unicode MS) .

API- Crystal - byzantine, , . , PageNofM, ( , {{}} {}, "" "" ). / , . , , .

+1

. . , . http://www.cogniza.com/blog/?p=55

Edit:

subreport ( ), . , .

- (UFL), . XML . , , ContentLocale.

0

if (CultureInfo.CurrentCulture.Name == "en-US")
{
   (obj.ReportDefinition.ReportObjects["lbleverest"] as TextObject).Text = resBundle.GetString("Localization", "everest");
   (obj.ReportDefinition.ReportObjects["lblmandlicode"] as TextObject).Text = resBundle.GetString("Localization", "SocietyCode");
   (obj.ReportDefinition.ReportObjects["MandliName1"] as FieldObject).ApplyFont(new Font(resBundle.GetString("Localization", "Font"), Convert.ToInt32(resBundle.GetString("Localization", "FontSize")), FontStyle.Regular));
   (obj.ReportDefinition.ReportObjects["shortName1"] as FieldObject).ApplyFont(new Font(resBundle.GetString("Localization", "Font"), Convert.ToInt32(resBundle.GetString("Localization", "FontSize")), FontStyle.Regular));        
}    
else    
{    
   (obj.ReportDefinition.ReportObjects["lbleverest"] as TextObject).Text = resBundle.GetString("Localization", "everest");    
   (obj.ReportDefinition.ReportObjects["lblmandlicode"] as TextObject).Text = resBundle.GetString("Localization", "SocietyCode");    
   (obj.ReportDefinition.ReportObjects["MandliName1"] as FieldObject).ApplyFont(new Font(resBundle.GetString("Localization", "Font"), Convert.ToInt32(resBundle.GetString("Localization", "FontSize")), FontStyle.Regular));    
   (obj.ReportDefinition.ReportObjects["shortName1"] as FieldObject).ApplyFont(new Font(resBundle.GetString("Localization", "Font"), Convert.ToInt32(resBundle.GetString("Localization", "FontSize")), FontStyle.Regular));    
}

obj.DataDefinition.FormulaFields["lang"].Text = "'" + CultureInfo.CurrentCulture.Name + "'";    
cv.crystalReportViewer1.ReportSource = obj;    
cv.Show();
-1

All Articles