none
How do I get default/English versions of ReportViewer messages? RRS feed

  • Question

  • I understand that I have to implement the IReportViewerMessages3 and set the Messages property of a ReportViewer in order to localize.  However, I'd like to know the English versions of these messages so that I don't have to invent them as I don't know the context where all of them are used.  Some of them are obvious but others aren't.  I figured I'd just get the Messages property and it would give me the English versions.  But, I've noticed it is null if I don't set it.  Am I missing something? 

    Also, I've noticed that the Messages property is of type IReportViewerMessages, not IReportViewerMessages3.  If I set it to a IReportViewerMessages3 object, will the IReportViewerMessages2 and IReportViewerMessages3 messages get to the right place?

    Friday, October 15, 2010 3:24 AM

All replies

  • It looks like the original strings are not documented specifically.  Which ones are giving you trouble?

    The property is of type IReportViewerMessages so that older code that does not implement the newer interface will continue to work.  Strings on the newer interfaces will work.

    Wednesday, October 27, 2010 8:30 PM
    Moderator
  • The ones that I'm not real sure about are the following methods.  I believe the properties are pretty self-explanatory.

    IReportViewerMessages3:
    string TotalPages(int pageCount, PageCountMode pageCountMode);

    IReportViewerMessages2:
    string CredentialMissingUserNameError(string dataSourcePrompt);
    string GetLocalizedNameForRenderingExtension(string format);
    string ParameterMissingSelectionError(string parameterPrompt);
    string ParameterMissingValueError(string parameterPrompt);

    Wednesday, November 10, 2010 11:55 PM
  • TotalPages: If the page count mode is actual, this is pageCount as a string in the current culture.  If it is estimate, it is pageCount as a string followed by " ?".

    CredentialMissingUserNameError: "Please supply a user name for data source '{dataSourcePrompt}'"

    GetLocalizedNameForRenderingExtension: This is different for each rendering extension.  It is the strings you see in the export dropdown in the toolbar.


    ParameterMissingSelectionError: Please select a value for the parameter '{parameterPrompt}'.


    ParameterMissingValueError: Please enter a value for the parameter '{parameterPrompt}'.  The parameter cannot be blank.

    Monday, November 15, 2010 3:50 AM
    Moderator