views:

1415

answers:

3

Hello everyone....

I'm using the Report System from Visual Studio (not Crystal Reports but RDLC). It works fine, but my problem is, that when setting the "Format code" on a Date-Field to "D" it formats it to an English Date (Wednesday, June 24, 2009) instead using my CultueInfo (German) and I can't find out how to pass a Culture-Info to the Report or the Date-Format.

+1  A: 

If you can't set the culture on the report, try creating a property on your class that does the conversion and returns it as a string.

public class YourClass
{
    public DateTime Date{ get; set; }

    public string FormattedDate
    {
       get { return Date.ToString("D", new System.Globalization.CultureInfo("de-DE")); }
    }
}

From your report you can access it as "=Fields!FormattedDate.Value".

Luis
A: 

=Format(Fields!FormattedDate.Value).("dd/MM/yyyy")

Prakash
+1  A: 

You can set the language property for the report too: http://i31.tinypic.com/1z3zbjd.jpg

Henrique Duarte