Search code examples
c#c#-4.0reporting-servicesreportviewerreport-viewer2010

Problem With Export Button in Report Viewer 2010 Localization


I localized Report Viewr 2010 using Implement this Interfaces: IReportViewerMessages,IReportViewerMessages2, IReportViewerMessages3

every thing is ok and my desire labels appears in report viewer.but when I open Export list there is no item in it.

enter image description here

what is my fault and how I can fix this?

thanks


Solution

  • this is possible by implement IReportViewerMessages2 and GetLocalizedNameForRenderingExtension method :

    public string GetLocalizedNameForRenderingExtension(string format)
    {
        switch (format.ToLower())
        {
            case "xml":
                return "your xml label";
            case "csv":
                return "your csv label";
            case "pdf":
                return "your pdf label";
            case "mhtml":
                return "your mhtml label";
            case "excel":
                return "your excel label";
            case "image":
                return "your image label";
            case "word":
                return "your word label";
        } 
    }