Skip to Content
avatar image
Former Member

Crystal Reports localization issue

Hi,

I am using Crystal Reports for .NET version 2005. Also, I am utilizing SQL Server 2005 as my database server. The problem is when I deploy applications in Spanish countries (maybe others, but did not try yet). The problem happens when dates are passed to SQL Server 2005, but only through Crystal Report engine.

I guess the question is if there is special need to localize crystal report setup?

Thanks in advance

Amer Gerzic

Infinity Software Solutions

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Oct 20, 2008 at 10:08 PM

    Hi, Amer;

    What behaviour are you expecting? If you have the report's database fields set to use the System Default values, then the report will change depending on where you are running the report.

    Is this a web or windows based application, and what is the verison of Crystal Reports?

    Best Regards,

    Jonathan

    Add comment
    10|10000 characters needed characters exceeded

    • Crystal Reports allows you to assign any object as the value of a DiscreteParameterValue or RangedParameterValue. What are you actually setting for the Value property? I normally pass a Date or DateTime object instead of a string to avoid this confusion. Please supply code.

  • avatar image
    Former Member
    Oct 23, 2008 at 12:52 PM

    David,

    Thanks a lot for reply!

    Here is the code that I use:

                        MachineProductionReport report = new MachineProductionReport();
                        SetReportLogOnInfo(report);
    
                        ParameterDiscreteValue discreteValue1 = new ParameterDiscreteValue();
                        discreteValue1.Value = dlg.MachineID; <- this has type String
                        report.ParameterFields["@machine_id"].CurrentValues.Add(discreteValue1);
                        report.DataDefinition.ParameterFields["@machine_id"].ApplyCurrentValues(report.ParameterFields["@machine_id"].CurrentValues);
    
                        ParameterDiscreteValue discreteValue2 = new ParameterDiscreteValue();
                        discreteValue2.Value = dlg.StartDate; <- this has type DateTime
                        report.ParameterFields["@start_date"].CurrentValues.Add(discreteValue2);
                        report.DataDefinition.ParameterFields["@start_date"].ApplyCurrentValues(report.ParameterFields["@start_date"].CurrentValues);
    
                        ParameterDiscreteValue discreteValue3 = new ParameterDiscreteValue();
                        discreteValue3.Value = dlg.EndDate; // <- this has type DateTime
                        report.ParameterFields["@end_date"].CurrentValues.Add(discreteValue3);
                        report.DataDefinition.ParameterFields["@end_date"].ApplyCurrentValues(report.ParameterFields["@end_date"].CurrentValues);
    
                        MainReportViewer.ReportSource = report;
    

    The issue is that it works fine in US, but not in Chile ... Everything else works though (passing string, int, etc.)

    Thanks in advance!

    Amer

    Add comment
    10|10000 characters needed characters exceeded