本地化Microsoft ReportViewer ,网上可找寻的代码不多,以下为可供参考的一篇,亲测有效,需稍加改动。

using System;
using System.Globalization;
using Microsoft.Reporting.WebForms;namespace InfoSupport.SomeApplication
{public class DutchReportViewerMessages : IReportViewerMessages, IReportViewerMessages2, IReportViewerMessages3{#region IReportViewerMessages Members// English value: Back to Parent Reportpublic string BackButtonToolTip{get { return "Terug naar het vorige rapport"; }}// English value: Change Credentialspublic string ChangeCredentialsText{get { return "Wijzig Rechten"; }}// English value: Change Credentialspublic string ChangeCredentialsToolTip{get { return "Wijzig Rechten"; }}// English value: Current Pagepublic string CurrentPageTextBoxToolTip{get { return "Huidige Pagina"; }}// English value: Document Mappublic string DocumentMap{get { return "Document Map"; }}// English value: Show / Hide Document Mappublic string DocumentMapButtonToolTip{get { return "Toon / Verberg Document Map"; }}// English value: Exportpublic string ExportButtonText{get { return "Exporteer"; }}// English value: Exportpublic string ExportButtonToolTip{get { return "Exporteer"; }}// English value: Export Formatspublic string ExportFormatsToolTip{get { return "Exporteer Formaten"; }}// English value: Falsepublic string FalseValueText{get { return "Onwaar"; }}// English value: Findpublic string FindButtonText{get { return "Zoek"; }}// English value: Findpublic string FindButtonToolTip{get { return "Zoek"; }}// English value: Nextpublic string FindNextButtonText{get { return "Volgende"; }}// English value: Find Nextpublic string FindNextButtonToolTip{get { return "Volgend Resultaat"; }}// English value: First Pagepublic string FirstPageButtonToolTip{get { return "Eerste Pagina"; }}// English value: Enter a valid page numberpublic string InvalidPageNumber{get { return "Voer een geldig paginanummer in"; }}// English value: Last Pagepublic string LastPageButtonToolTip{get { return "Laatste Pagina"; }}// English value: Next Pagepublic string NextPageButtonToolTip{get { return "Volgende Pagina"; }}// English value: The entire report has been searched.public string NoMoreMatches{get { return "Het volledige rapport is doorzocht."; }}// English value: NULLpublic string NullCheckBoxText{get { return "Geen waarde"; }}// English value: Nullpublic string NullValueText{get { return "Geen waarde"; }}// English value: ofpublic string PageOf{get { return "van"; }}// English value: Show / Hide Parameterspublic string ParameterAreaButtonToolTip{get { return "Toon / Verberg Parameters"; }}// English value: Password:public string PasswordPrompt{get { return "Wachtwoord:"; }}// English value: Previous Pagepublic string PreviousPageButtonToolTip{get { return "Vorige Pagina"; }}// English value: Printpublic string PrintButtonToolTip{get { return "Afdrukken"; }}// English value: Loading...public string ProgressText{get { return "Verwerken..."; }}// English value: Refreshpublic string RefreshButtonToolTip{get { return "Vernieuwen"; }}// English value: Find Text in Reportpublic string SearchTextBoxToolTip{get { return "Zoek naar tekst binnen het rapport"; }}// English value: <Select a Value>public string SelectAValue{get { return "<Selecteer een waarde>"; }}// English value: (Select All)public string SelectAll{get { return "(Selecteer alles)"; }}// English value: Select a formatpublic string SelectFormat{get { return "Selecteer een formaat"; }}// English value: The search text was not found.public string TextNotFound{get { return "De zoektekst is niet gevonden."; }}// English value: Today is {0}public string TodayIs{get { return "Vandaag is {0}"; }}// English value: Truepublic string TrueValueText{get { return "Waar"; }}// English value: Log In Name:public string UserNamePrompt{get { return "Gebruikersnaam:"; }}// English value: View Reportpublic string ViewReportButtonText{get { return "Toon Rapport"; }}// English value: Zoompublic string ZoomControlToolTip{get { return "Zoom"; }}// English value: Page Widthpublic string ZoomToPageWidth{get { return "Paginabreedte"; }}// English value: Whole Pagepublic string ZoomToWholePage{get { return "Volledige pagina"; }}#endregion#region IReportViewerMessages2 Members// English value: Your browser does not support scripts or has been configured not to allow scripts.public string ClientNoScript{get { return "Uw browser ondersteunt geen JavaScript of deze ondersteuning is uitgeschakeld."; }}// English value: Unable to load client print control.public string ClientPrintControlLoadFailed{get { return "Het laden van het client print control is niet gelukt."; }}// English value: One or more data sources is missing a user name.public string CredentialMissingUserNameError(string dataSourcePrompt){return "Een of meerdere databronnen missen een gebruikersnaam.";}// English value is different for each Rendering Extension. See comment behind each type.public string GetLocalizedNameForRenderingExtension(string format){switch (format){case "XML"   : return "XML databestand (.xml)";  // XML file with report datacase "CSV"   : return "CSV databestand (.csv)";  // CSV (comma delimited)case "PDF"   : return "PDF document (.pdf)";     // PDFcase "MHTML" : return "Webarchief (.mhtml)";     // MHTML (web archive)case "EXCEL" : return "Excel rekenblad (.xls)";  // Excelcase "IMAGE" : return "Afbeelding (.tif)";       // TIFF filecase "WORD"  : return "Word document (.doc)";    // Worddefault      : return null;}}// English value: Select a valuepublic string ParameterDropDownToolTip{get { return "Selecteer een waarde"; }}// English value: Please select a value for the parameter '{0}'.public string ParameterMissingSelectionError(string parameterPrompt){return String.Format(CultureInfo.CurrentCulture, "Selecteer een waarde voor de parameter '{0}'", parameterPrompt);}// English value: Please enter a value for the parameter '{0}'. The parameter cannot be blank.public string ParameterMissingValueError(string parameterPrompt){return String.Format(CultureInfo.CurrentCulture, "Selecteer een waarde voor de parameter '{0}'. De parameter mag niet leeg zijn.", parameterPrompt);}#endregion#region IReportViewerMessages3 Members// English value: Loading...public string CalendarLoading{get { return "Verwerken..."; }}// English value: Cancelpublic string CancelLinkText{get { return "Annuleer"; }}// English value: pageCount if PageCountMode.Actual, else pageCount suffixed with a ?public string TotalPages(int pageCount, PageCountMode pageCountMode){return string.Format(CultureInfo.CurrentCulture, "{0}{1}", pageCount, pageCountMode == PageCountMode.Estimate ? "~" : String.Empty);}#endregion}
}

https://devillers.nl/blog/localizing-microsoft-reportviewer/

相关msdn链接:https://docs.microsoft.com/zh-cn/previous-versions/visualstudio/visual-studio-2010/dd468082(v=vs.100)

https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/ms255036(v=vs.100)

https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/ms255383%28v%3dvs.100%29

https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/dd468082%28v%3dvs.100%29

可以通过实现三个IReportViewerMessages接口来本地化Microsoft ReportViewer Control 。但是,这些接口的文档缺少原始的字符串值,这反过来又使得难以提供适当的转换。在此博客中,提供了这些值的完整列表以及IReportViewerMessages的荷兰语实现。

Microsoft ReportViewer

Microsoft ReportViewer是一个.NET控件,可以在Windows和Web应用程序中使用它来呈现Microsoft Reports。顾名思义,ReportViewer的功能远不只是查看报告。该控件能够加载(远程)RDL文件,执行其内容并以各种格式(包括HTML,Excel,Word,PDF)呈现最终结果。呈现后,用户可以与控件进行交互,以传递报告参数,浏览多页报告等等。

ReportViewer本地化为荷兰的文化和语言。

在我当前的项目中,我们将ReportViewer嵌入到ASP MVC Web应用程序中。由于应用程序的受众是荷兰人,因此所有内容(包括ReportViewer)都必须本地化为荷兰文化。不幸的是,可用于ReportViewer的语言包不包括荷兰语,因此我不得不提出一种替代解决方案。

善良

幸运的是,Microsoft在ReportViewer控件中包含了一种机制,该机制允许开发人员覆盖默认消息。这是通过在利用ReportViewer的父应用程序中实现各种接口,然后将这些自定义实现传递给ReportViewer控件来实现的。

更具体地讲,这些接口IReportViewerMessagesIReportViewerMessages2并且IReportViewerMessages3,它驻留在Microsoft.Reporting.WebForms命名空间(或的WinForms,如果你正在使用的)。这些接口实质上只是具有静态硬编码值的只读字符串属性的集合。

坏人

尽管Microsoft足够优雅地记录了 这些 接口,但它们的文档缺少这些字符串属性的原始值。结果,任何想要为这些属性创建有意义的翻译的人都必须从属性的名称和描述而不是原始值中推断出含义。这可能是当面对神秘的名字,如相当具有挑战性ParameterAreaButtonToolTipNullValueTextClientPrintControlLoadFailed

丑陋的

尽管缺乏原始价值是一件令人讨厌的事,但这绝不是一件容易的事。翻译不善可能导致用户面对看似不合适的消息,但应用程序本身仍将保持功能。或者我以为:

首次尝试本地化ReportViewer会导致FormatException

大多数.NET开发人员都会熟悉此异常,因为它是String.Format被用格式字符串调用的结果,该格式字符串与要格式化的预期对象不匹配。换句话说,我要翻译的一个或多个字符串使用了复合格式设置功能。如果没有这些字符串的原始英文值,则可以猜测这些字符串中的哪些必须包含格式占位符。

解决方案

为了解决此问题,我对ReportViewer程序集进行了反编译,并提取了这些属性的原始字符串值。下面是我的荷兰语IReportViewerMessages接口实现的版本。每个属性均包含英文原始文本,因此您可以将其用作自己的翻译的模板。

自然地,如果我没有一些匹配的单元测试就粘贴代码是不负责任的:

using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using InfoSupport.SomeApplication;namespace InfoSupport.SomeApplication.Tests
{[TestClass]public class DutchReportViewerMessagesTests{[TestMethod]public void TranslatedStringsTests(){var m = new DutchReportViewerMessages();Assert.IsTrue(!String.IsNullOrEmpty(m.BackButtonToolTip));Assert.IsTrue(!String.IsNullOrEmpty(m.CalendarLoading));Assert.IsTrue(!String.IsNullOrEmpty(m.CancelLinkText));Assert.IsTrue(!String.IsNullOrEmpty(m.ChangeCredentialsText));Assert.IsTrue(!String.IsNullOrEmpty(m.ChangeCredentialsToolTip));Assert.IsTrue(!String.IsNullOrEmpty(m.ClientNoScript));Assert.IsTrue(!String.IsNullOrEmpty(m.ClientPrintControlLoadFailed));Assert.IsTrue(!String.IsNullOrEmpty(m.CredentialMissingUserNameError(null)));Assert.IsTrue(!String.IsNullOrEmpty(m.CurrentPageTextBoxToolTip));Assert.IsTrue(!String.IsNullOrEmpty(m.DocumentMap));Assert.IsTrue(!String.IsNullOrEmpty(m.DocumentMapButtonToolTip));Assert.IsTrue(!String.IsNullOrEmpty(m.ExportButtonText));Assert.IsTrue(!String.IsNullOrEmpty(m.ExportButtonToolTip));Assert.IsTrue(!String.IsNullOrEmpty(m.ExportFormatsToolTip));Assert.IsTrue(!String.IsNullOrEmpty(m.FalseValueText));Assert.IsTrue(!String.IsNullOrEmpty(m.FindButtonText));Assert.IsTrue(!String.IsNullOrEmpty(m.FindButtonToolTip));Assert.IsTrue(!String.IsNullOrEmpty(m.FindNextButtonText));Assert.IsTrue(!String.IsNullOrEmpty(m.FindNextButtonToolTip));Assert.IsTrue(!String.IsNullOrEmpty(m.FirstPageButtonToolTip));Assert.IsTrue(!String.IsNullOrEmpty(m.InvalidPageNumber));Assert.IsTrue(!String.IsNullOrEmpty(m.LastPageButtonToolTip));Assert.IsTrue(!String.IsNullOrEmpty(m.NextPageButtonToolTip));Assert.IsTrue(!String.IsNullOrEmpty(m.NoMoreMatches));Assert.IsTrue(!String.IsNullOrEmpty(m.NullCheckBoxText));Assert.IsTrue(!String.IsNullOrEmpty(m.NullValueText));Assert.IsTrue(!String.IsNullOrEmpty(m.PageOf));Assert.IsTrue(!String.IsNullOrEmpty(m.ParameterAreaButtonToolTip));Assert.IsTrue(!String.IsNullOrEmpty(m.ParameterDropDownToolTip));Assert.IsTrue(!String.IsNullOrEmpty(m.ParameterMissingSelectionError(String.Empty)));Assert.IsTrue(!String.IsNullOrEmpty(m.ParameterMissingValueError(String.Empty)));Assert.IsTrue(!String.IsNullOrEmpty(m.PasswordPrompt));Assert.IsTrue(!String.IsNullOrEmpty(m.PreviousPageButtonToolTip));Assert.IsTrue(!String.IsNullOrEmpty(m.PrintButtonToolTip));Assert.IsTrue(!String.IsNullOrEmpty(m.ProgressText));Assert.IsTrue(!String.IsNullOrEmpty(m.RefreshButtonToolTip));Assert.IsTrue(!String.IsNullOrEmpty(m.SearchTextBoxToolTip));Assert.IsTrue(!String.IsNullOrEmpty(m.SelectAll));Assert.IsTrue(!String.IsNullOrEmpty(m.SelectAValue));Assert.IsTrue(!String.IsNullOrEmpty(m.SelectFormat));Assert.IsTrue(!String.IsNullOrEmpty(m.TextNotFound));Assert.IsTrue(!String.IsNullOrEmpty(m.TodayIs));Assert.IsTrue(!String.IsNullOrEmpty(m.TrueValueText));Assert.IsTrue(!String.IsNullOrEmpty(m.UserNamePrompt));Assert.IsTrue(!String.IsNullOrEmpty(m.ViewReportButtonText));Assert.IsTrue(!String.IsNullOrEmpty(m.ZoomControlToolTip));Assert.IsTrue(!String.IsNullOrEmpty(m.ZoomToPageWidth));Assert.IsTrue(!String.IsNullOrEmpty(m.ZoomToWholePage));}[TestMethod]public void FormattableStringsTest(){var m = new DutchReportViewerMessages();var parameter = "abc123";Assert.IsTrue(m.ParameterMissingSelectionError(parameter).Contains(parameter));Assert.IsTrue(m.ParameterMissingValueError(parameter).Contains(parameter));Assert.IsTrue(String.Format(m.TodayIs, parameter).Contains(parameter));}[TestMethod]public void GetLocalizedNameForRenderingExtensionTest(){var m = new DutchReportViewerMessages();string[] knownExtensions = { "XML", "CSV", "PDF", "MHTML", "EXCEL", "IMAGE", "WORD"};foreach (var ext in knownExtensions)Assert.IsTrue(!String.IsNullOrEmpty(m.GetLocalizedNameForRenderingExtension(ext)));}[TestMethod]public void GetLocalizedNameForRenderingExtensionTest_UnknownExtensionReturnsNull(){var m = new DutchReportViewerMessages();string[] unknownExtensions = { "DOCX", "PNG", "JPG", "JPEG" };foreach (var ext in unknownExtensions)Assert.IsNull(m.GetLocalizedNameForRenderingExtension(ext));}[TestMethod]public void TotalPagesTest(){var m = new DutchReportViewerMessages();Assert.AreEqual("10",  m.TotalPages(10, Microsoft.Reporting.WebForms.PageCountMode.Actual));Assert.AreEqual("10~", m.TotalPages(10, Microsoft.Reporting.WebForms.PageCountMode.Estimate));}}
}

此外,下面是所有属性的表格以及它们各自的英语和荷兰语翻译。请注意,该表不包括属于接口的方法。

IREPORTVIEWER消息

物业名称 原始英语价值 荷兰语翻译
BackButtonToolTip 返回上级报告 Terug naar het vorige融洽关系
ChangeCredentialsText 变更凭证 维希格·雷希滕
ChangeCredentialsToolTip 变更凭证 维希格·雷希滕
CurrentPageTextBoxToolTip 当前页面 希迪格·帕吉纳
DocumentMap 文件图 文件图
DocumentMapButtonToolTip 显示/隐藏文档图 Toon / Verberg文档图
ExportButtonText 出口 出口商
ExportButtonToolTip 出口 出口商
ExportFormatsToolTip 导出格式 出口商格式化
FalseValueText Onwaar
FindButtonText 佐克
FindButtonToolTip 佐克
FindNextButtonText 下一个 伏根德
FindNextButtonToolTip 找下一个 Volgend结果
FirstPageButtonToolTip 第一页 埃斯特·帕吉纳(Eerste Pagina)
InvalidPageNumber 输入有效的页码 Voer een geldig paginanummer在
LastPageButtonToolTip 最后一页 Laatste Pagina
NextPageButtonToolTip 下一页 Volgende Pagina
NoMore比赛 整个报告已被搜索。 混血儿和睦相处是doorzocht。
NullCheckBoxText 空值 吉恩·沃德
空值文本 空值 吉恩·沃德
PageOf 货车
ParameterAreaButtonToolTip 显示/隐藏参数 Toon / Verberg参数
密码提示 密码: Wachtwoord:
PreviousPageButtonToolTip 上一页 沃里格·帕吉纳(Vorige Pagina)
打印按钮工具提示 打印 阿夫德鲁肯
ProgressText 载入中... Verwerken…
刷新按钮工具提示 刷新 韦尔纽纽
SearchTextBoxToolTip 在报告中查找文本 Zoek Naar Tekst Binnen Het融洽
选择值 <选择值> <选帝侯瓦德>
全选 (全选) (选拔队)
选择格式 选择格式 选择者形成
TextNotFound 找不到搜索文字。 De zoektekst是niet gevonden。
今天是 今天是{0} Vandaag是{0}
TrueValueText 真正 Waar
用户名提示 登录名: Gebruikersnaam:
查看报告 ViewReportButtonText 卡通香椿
ZoomControlToolTip 放大 放大
ZoomToPageWidth 页面宽度 Paginabreedte
缩放到整个页面 整页 Volledige Pagina

IREPORTVIEWERMESSAGES2

物业名称 原始英语价值 荷兰语翻译
ClientNoScript 您的浏览器不支持脚本或已被配置为不允许脚本。 Uw浏览器ondesteunting的deze ondersteuninging JavaScript是uitgeschakeld。
ClientPrintControlLoadFailed 无法加载客户端打印控件。 杂货客户的打印控件是niet gelukt。
ParameterDropDownToolTip 选择一个值 甄选人

IREPORTVIEWERMESSAGES3

物业名称 原始英语价值 荷兰语翻译
日历加载 载入中... Verwerken…
取消链接文字 取消 安乐儿

附加条款

  • 返回null将使ReportViewer默认返回原始值。将此属性用于不希望转换的字符串属性或方法。
  • 要使ReportViewer接管您的自定义实施,需要更改应用程序的web.config或app.config。添加<add key="ReportViewerMessages" value="MyClass, MyAssembly" />到您的appSettings中,并用实现类及其所在的程序集的名称替换MyClass和MyAssembly。

摘要

可以通过实现三个IReportViewerMessages接口来本地化Microsoft ReportViewer Control。但是,这些接口的文档缺少原始的字符串值,从而使提供正确的转换变得很困难。在此博客中,提供了这些值的完整列表以及IReportViewerMessages的荷兰语实现。

https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/aa992078%28v%3dvs.100%29

https://blogs.infosupport.com/localizing-microsoft-reportviewer/

  • 本地化Microsoft ReportViewer

    • 由马丁Devillers

    可以通过实现三个IReportViewerMessages接口来本地化Microsoft ReportViewer Control 。但是,这些接口的文档缺少原始的字符串值,这反过来又使得难以提供适当的转换。在此博客中,提供了这些值的完整列表以及IReportViewerMessages的荷兰语实现。

    Microsoft ReportViewer

    Microsoft ReportViewer是一个.NET控件,可以在Windows和Web应用程序中使用它来呈现Microsoft Reports。顾名思义,ReportViewer的功能远不只是查看报告。该控件能够加载(远程)RDL文件,执行其内容并以各种格式(包括HTML,Excel,Word,PDF)呈现最终结果。呈现后,用户可以与控件进行交互,以传递报告参数,浏览多页报告等等。

    ReportViewer本地化为荷兰的文化和语言。

    在我当前的项目中,我们将ReportViewer嵌入到ASP MVC Web应用程序中。由于应用程序的受众是荷兰人,因此所有内容(包括ReportViewer)都必须本地化为荷兰文化。不幸的是,可用于ReportViewer的语言包不包括荷兰语,因此我不得不提出一种替代解决方案。

    善良

    幸运的是,Microsoft在ReportViewer控件中包含了一种机制,该机制允许开发人员覆盖默认消息。这是通过在利用ReportViewer的父应用程序中实现各种接口,然后将这些自定义实现传递给ReportViewer控件来实现的。

    更具体地讲,这些接口IReportViewerMessagesIReportViewerMessages2 并且IReportViewerMessages3,它驻留在Microsoft.Reporting.WebForms命名空间(或的WinForms,如果你正在使用的)。这些接口实质上只是具有静态硬编码值的只读字符串属性的集合。

    坏人

    尽管Microsoft足够优雅地记录了 这些 接口,但它们的文档缺少这些字符串属性的原始值。结果,任何想要为这些属性创建有意义的翻译的人都必须从属性的名称和描述而不是原始值中推断出含义。这可能是当面对神秘的名字,如相当具有挑战性ParameterAreaButtonToolTipNullValueText ClientPrintControlLoadFailed

    丑陋的

    尽管缺乏原始价值是一件令人讨厌的事,但这绝不是一件容易的事。翻译不善可能导致用户面对看似不合适的消息,但应用程序本身仍将保持功能。或者我以为:

    首次尝试本地化ReportViewer会导致FormatException

    大多数.NET开发人员都将熟悉此异常,因为它是String.Format用格式字符串调用的结果,该字符串与要格式化的预期对象不匹配。换句话说,我要翻译的一个或多个字符串使用了复合格式设置功能。如果没有这些字符串的原始英文值,则可以猜测这些字符串中的哪些必须包含格式占位符。

    解决方案

    为了解决此问题,我对ReportViewer程序集进行了反编译,并提取了这些属性的原始字符串值。下面是我的荷兰语IReportViewerMessages接口实现的版本。每个属性均包含英文原始文本,因此您可以将其用作自己的翻译的模板。

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    using System;
    using System.Globalization;
    using Microsoft.Reporting.WebForms;
    namespace InfoSupport.SomeApplication
    {
        public class DutchReportViewerMessages : IReportViewerMessages, IReportViewerMessages2, IReportViewerMessages3
        {
            #region IReportViewerMessages Members
            // English value: Back to Parent Report
            public string BackButtonToolTip
            {
                get { return &quot;Terug naar het vorige rapport&quot;; }
            }
            // English value: Change Credentials
            public string ChangeCredentialsText
            {
                get { return &quot;Wijzig Rechten&quot;; }
            }
            // English value: Change Credentials
            public string ChangeCredentialsToolTip
            {
                get { return &quot;Wijzig Rechten&quot;; }
            }
            // English value: Current Page
            public string CurrentPageTextBoxToolTip
            {
                get { return &quot;Huidige Pagina&quot;; }
            }
            // English value: Document Map
            public string DocumentMap
            {
                get { return &quot;Document Map&quot;; }
            }
            // English value: Show / Hide Document Map
            public string DocumentMapButtonToolTip
            {
                get { return &quot;Toon / Verberg Document Map&quot;; }
            }
            // English value: Export
            public string ExportButtonText
            {
                get { return &quot;Exporteer&quot;; }
            }
            // English value: Export
            public string ExportButtonToolTip
            {
                get { return &quot;Exporteer&quot;; }
            }
            // English value: Export Formats
            public string ExportFormatsToolTip
            {
                get { return &quot;Exporteer Formaten&quot;; }
            }
            // English value: False
            public string FalseValueText
            {
                get { return &quot;Onwaar&quot;; }
            }
            // English value: Find
            public string FindButtonText
            {
                get { return &quot;Zoek&quot;; }
            }
            // English value: Find
            public string FindButtonToolTip
            {
                get { return &quot;Zoek&quot;; }
            }
            // English value: Next
            public string FindNextButtonText
            {
                get { return &quot;Volgende&quot;; }
            }
            // English value: Find Next
            public string FindNextButtonToolTip
            {
                get { return &quot;Volgend Resultaat&quot;; }
            }
            // English value: First Page
            public string FirstPageButtonToolTip
            {
                get { return &quot;Eerste Pagina&quot;; }
            }
            // English value: Enter a valid page number
            public string InvalidPageNumber
            {
                get { return &quot;Voer een geldig paginanummer in&quot;; }
            }
            // English value: Last Page
            public string LastPageButtonToolTip
            {
                get { return &quot;Laatste Pagina&quot;; }
            }
            // English value: Next Page
            public string NextPageButtonToolTip
            {
                get { return &quot;Volgende Pagina&quot;; }
            }
            // English value: The entire report has been searched.
            public string NoMoreMatches
            {
                get { return &quot;Het volledige rapport is doorzocht.&quot;; }
            }
            // English value: NULL
            public string NullCheckBoxText
            {
                get { return &quot;Geen waarde&quot;; }
            }
            // English value: Null
            public string NullValueText
            {
                get { return &quot;Geen waarde&quot;; }
            }
            // English value: of
            public string PageOf
            {
                get { return &quot;van&quot;; }
            }
            // English value: Show / Hide Parameters
            public string ParameterAreaButtonToolTip
            {
                get { return &quot;Toon / Verberg Parameters&quot;; }
            }
            // English value: Password:
            public string PasswordPrompt
            {
                get { return &quot;Wachtwoord:&quot;; }
            }
            // English value: Previous Page
            public string PreviousPageButtonToolTip
            {
                get { return &quot;Vorige Pagina&quot;; }
            }
            // English value: Print
            public string PrintButtonToolTip
            {
                get { return &quot;Afdrukken&quot;; }
            }
            // English value: Loading...
            public string ProgressText
            {
                get { return &quot;Verwerken...&quot;; }
            }
            // English value: Refresh
            public string RefreshButtonToolTip
            {
                get { return &quot;Vernieuwen&quot;; }
            }
            // English value: Find Text in Report
            public string SearchTextBoxToolTip
            {
                get { return &quot;Zoek naar tekst binnen het rapport&quot;; }
            }
            // English value: <Select a Value>
            public string SelectAValue
            {
                get { return &quot;<Selecteer een waarde>&quot;; }
            }
            // English value: (Select All)
            public string SelectAll
            {
                get { return &quot;(Selecteer alles)&quot;; }
            }
            // English value: Select a format
            public string SelectFormat
            {
                get { return &quot;Selecteer een formaat&quot;; }
            }
            // English value: The search text was not found.
            public string TextNotFound
            {
                get { return &quot;De zoektekst is niet gevonden.&quot;; }
            }
            // English value: Today is {0}
            public string TodayIs
            {
                get { return &quot;Vandaag is {0}&quot;; }
            }
            // English value: True
            public string TrueValueText
            {
                get { return &quot;Waar&quot;; }
            }
            // English value: Log In Name:
            public string UserNamePrompt
            {
                get { return &quot;Gebruikersnaam:&quot;; }
            }
            // English value: View Report
            public string ViewReportButtonText
            {
                get { return &quot;Toon Rapport&quot;; }
            }
            // English value: Zoom
            public string ZoomControlToolTip
            {
                get { return &quot;Zoom&quot;; }
            }
            // English value: Page Width
            public string ZoomToPageWidth
            {
                get { return &quot;Paginabreedte&quot;; }
            }
            // English value: Whole Page
            public string ZoomToWholePage
            {
                get { return &quot;Volledige pagina&quot;; }
            }
            #endregion
            #region IReportViewerMessages2 Members
            // English value: Your browser does not support scripts or has been configured not to allow scripts.
            public string ClientNoScript
            {
                get { return &quot;Uw browser ondersteunt geen JavaScript of deze ondersteuning is uitgeschakeld.&quot;; }
            }
            // English value: Unable to load client print control.
            public string ClientPrintControlLoadFailed
            {
                get { return &quot;Het laden van het client print control is niet gelukt.&quot;; }
            }
            // English value: One or more data sources is missing a user name.
            public string CredentialMissingUserNameError(string dataSourcePrompt)
            {
                return &quot;Een of meerdere databronnen missen een gebruikersnaam.&quot;;
            }
            // English value is different for each Rendering Extension. See comment behind each type.
            public string GetLocalizedNameForRenderingExtension(string format)
            {
                switch (format)
                {
                    case &quot;XML&quot;   : return &quot;XML databestand (.xml)&quot;;  // XML file with report data
                    case &quot;CSV&quot;   : return &quot;CSV databestand (.csv)&quot;;  // CSV (comma delimited)
                    case &quot;PDF&quot;   : return &quot;PDF document (.pdf)&quot;;     // PDF
                    case &quot;MHTML&quot; : return &quot;Webarchief (.mhtml)&quot;;     // MHTML (web archive)
                    case &quot;EXCEL&quot; : return &quot;Excel rekenblad (.xls)&quot;;  // Excel
                    case &quot;IMAGE&quot; : return &quot;Afbeelding (.tif)&quot;;       // TIFF file
                    case &quot;WORD&quot;  : return &quot;Word document (.doc)&quot;;    // Word
                    default      : return null;
                }
            }
            // English value: Select a value
            public string ParameterDropDownToolTip
            {
                get { return &quot;Selecteer een waarde&quot;; }
            }
            // English value: Please select a value for the parameter '{0}'.
            public string ParameterMissingSelectionError(string parameterPrompt)
            {
                return String.Format(CultureInfo.CurrentCulture, &quot;Selecteer een waarde voor de parameter '{0}'&quot;, parameterPrompt);
            }
            // English value: Please enter a value for the parameter '{0}'. The parameter cannot be blank.
            public string ParameterMissingValueError(string parameterPrompt)
            {
                return String.Format(CultureInfo.CurrentCulture, &quot;Selecteer een waarde voor de parameter '{0}'. De parameter mag niet leeg zijn.&quot;, parameterPrompt);
            }
            #endregion
            #region IReportViewerMessages3 Members
            // English value: Loading...
            public string CalendarLoading
            {
                get { return &quot;Verwerken...&quot;; }
            }
            // English value: Cancel
            public string CancelLinkText
            {
                get { return &quot;Annuleer&quot;; }
            }
            // English value: pageCount if PageCountMode.Actual, else pageCount suffixed with a ?
            public string TotalPages(int pageCount, PageCountMode pageCountMode)
            {
                return string.Format(CultureInfo.CurrentCulture, &quot;{0}{1}&quot;, pageCount, pageCountMode == PageCountMode.Estimate ? &quot;~&quot; : String.Empty);
            }
            #endregion
        }
    }

    自然地,如果我没有一些匹配的单元测试就粘贴代码是不负责任的:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    using System;
    using Microsoft.VisualStudio.TestTools.UnitTesting;
    using InfoSupport.SomeApplication;
    namespace InfoSupport.SomeApplication.Tests
    {
        [TestClass]
        public class DutchReportViewerMessagesTests
        {
            [TestMethod]
            public void TranslatedStringsTests()
            {
                var m = new DutchReportViewerMessages();
                Assert.IsTrue(!String.IsNullOrEmpty(m.BackButtonToolTip));
                Assert.IsTrue(!String.IsNullOrEmpty(m.CalendarLoading));
                Assert.IsTrue(!String.IsNullOrEmpty(m.CancelLinkText));
                Assert.IsTrue(!String.IsNullOrEmpty(m.ChangeCredentialsText));
                Assert.IsTrue(!String.IsNullOrEmpty(m.ChangeCredentialsToolTip));
                Assert.IsTrue(!String.IsNullOrEmpty(m.ClientNoScript));
                Assert.IsTrue(!String.IsNullOrEmpty(m.ClientPrintControlLoadFailed));
                Assert.IsTrue(!String.IsNullOrEmpty(m.CredentialMissingUserNameError(null)));
                Assert.IsTrue(!String.IsNullOrEmpty(m.CurrentPageTextBoxToolTip));
                Assert.IsTrue(!String.IsNullOrEmpty(m.DocumentMap));
                Assert.IsTrue(!String.IsNullOrEmpty(m.DocumentMapButtonToolTip));
                Assert.IsTrue(!String.IsNullOrEmpty(m.ExportButtonText));
                Assert.IsTrue(!String.IsNullOrEmpty(m.ExportButtonToolTip));
                Assert.IsTrue(!String.IsNullOrEmpty(m.ExportFormatsToolTip));
                Assert.IsTrue(!String.IsNullOrEmpty(m.FalseValueText));
                Assert.IsTrue(!String.IsNullOrEmpty(m.FindButtonText));
                Assert.IsTrue(!String.IsNullOrEmpty(m.FindButtonToolTip));
                Assert.IsTrue(!String.IsNullOrEmpty(m.FindNextButtonText));
                Assert.IsTrue(!String.IsNullOrEmpty(m.FindNextButtonToolTip));
                Assert.IsTrue(!String.IsNullOrEmpty(m.FirstPageButtonToolTip));
                Assert.IsTrue(!String.IsNullOrEmpty(m.InvalidPageNumber));
                Assert.IsTrue(!String.IsNullOrEmpty(m.LastPageButtonToolTip));
                Assert.IsTrue(!String.IsNullOrEmpty(m.NextPageButtonToolTip));
                Assert.IsTrue(!String.IsNullOrEmpty(m.NoMoreMatches));
                Assert.IsTrue(!String.IsNullOrEmpty(m.NullCheckBoxText));
                Assert.IsTrue(!String.IsNullOrEmpty(m.NullValueText));
                Assert.IsTrue(!String.IsNullOrEmpty(m.PageOf));
                Assert.IsTrue(!String.IsNullOrEmpty(m.ParameterAreaButtonToolTip));
                Assert.IsTrue(!String.IsNullOrEmpty(m.ParameterDropDownToolTip));
                Assert.IsTrue(!String.IsNullOrEmpty(m.ParameterMissingSelectionError(String.Empty)));
                Assert.IsTrue(!String.IsNullOrEmpty(m.ParameterMissingValueError(String.Empty)));
                Assert.IsTrue(!String.IsNullOrEmpty(m.PasswordPrompt));
                Assert.IsTrue(!String.IsNullOrEmpty(m.PreviousPageButtonToolTip));
                Assert.IsTrue(!String.IsNullOrEmpty(m.PrintButtonToolTip));
                Assert.IsTrue(!String.IsNullOrEmpty(m.ProgressText));
                Assert.IsTrue(!String.IsNullOrEmpty(m.RefreshButtonToolTip));
                Assert.IsTrue(!String.IsNullOrEmpty(m.SearchTextBoxToolTip));
                Assert.IsTrue(!String.IsNullOrEmpty(m.SelectAll));
                Assert.IsTrue(!String.IsNullOrEmpty(m.SelectAValue));
                Assert.IsTrue(!String.IsNullOrEmpty(m.SelectFormat));
                Assert.IsTrue(!String.IsNullOrEmpty(m.TextNotFound));
                Assert.IsTrue(!String.IsNullOrEmpty(m.TodayIs));
                Assert.IsTrue(!String.IsNullOrEmpty(m.TrueValueText));
                Assert.IsTrue(!String.IsNullOrEmpty(m.UserNamePrompt));
                Assert.IsTrue(!String.IsNullOrEmpty(m.ViewReportButtonText));
                Assert.IsTrue(!String.IsNullOrEmpty(m.ZoomControlToolTip));
                Assert.IsTrue(!String.IsNullOrEmpty(m.ZoomToPageWidth));
                Assert.IsTrue(!String.IsNullOrEmpty(m.ZoomToWholePage));
            }
            [TestMethod]
            public void FormattableStringsTest()
            {
                var m = new DutchReportViewerMessages();
                var parameter = &quot;abc123&quot;;
                Assert.IsTrue(m.ParameterMissingSelectionError(parameter).Contains(parameter));
                Assert.IsTrue(m.ParameterMissingValueError(parameter).Contains(parameter));
                Assert.IsTrue(String.Format(m.TodayIs, parameter).Contains(parameter));
            }
            [TestMethod]
            public void GetLocalizedNameForRenderingExtensionTest()
            {
                var m = new DutchReportViewerMessages();
                string[] knownExtensions = { &quot;XML&quot;, &quot;CSV&quot;, &quot;PDF&quot;, &quot;MHTML&quot;, &quot;EXCEL&quot;, &quot;IMAGE&quot;, &quot;WORD&quot;};
                foreach (var ext in knownExtensions)
                    Assert.IsTrue(!String.IsNullOrEmpty(m.GetLocalizedNameForRenderingExtension(ext)));
            }
            [TestMethod]
            public void GetLocalizedNameForRenderingExtensionTest_UnknownExtensionReturnsNull()
            {
                var m = new DutchReportViewerMessages();
                string[] unknownExtensions = { &quot;DOCX&quot;, &quot;PNG&quot;, &quot;JPG&quot;, &quot;JPEG&quot; };
                foreach (var ext in unknownExtensions)
                    Assert.IsNull(m.GetLocalizedNameForRenderingExtension(ext));
            }
            [TestMethod]
            public void TotalPagesTest()
            {
                var m = new DutchReportViewerMessages();
                Assert.AreEqual(&quot;10&quot;,  m.TotalPages(10, Microsoft.Reporting.WebForms.PageCountMode.Actual));
                Assert.AreEqual(&quot;10~&quot;, m.TotalPages(10, Microsoft.Reporting.WebForms.PageCountMode.Estimate));
            }
        }
    }

    此外,下面是所有属性的表格以及它们各自的英语和荷兰语翻译。请注意,该表不包括属于接口的方法。

    IReportViewerMessages

    物业名称 原始英文价值 荷兰语翻译
    BackButtonToolTip Back to Parent Report Terug naar het vorige rapport
    ChangeCredentialsText Change Credentials Wijzig Rechten
    ChangeCredentialsToolTip Change Credentials Wijzig Rechten
    CurrentPageTextBoxToolTip Current Page Huidige Pagina
    DocumentMap Document Map Document Map
    DocumentMapButtonToolTip Show / Hide Document Map Toon / Verberg Document Map
    ExportButtonText Export Exporteer
    ExportButtonToolTip Export Exporteer
    ExportFormatsToolTip Export Formats Exporteer Formaten
    FalseValueText False Onwaar
    FindButtonText Find Zoek
    FindButtonToolTip Find Zoek
    FindNextButtonText Next Volgende
    FindNextButtonToolTip Find Next Volgend Resultaat
    FirstPageButtonToolTip First Page Eerste Pagina
    InvalidPageNumber Enter a valid page number Voer een geldig paginanummer in
    LastPageButtonToolTip Last Page Laatste Pagina
    NextPageButtonToolTip Next Page Volgende Pagina
    NoMoreMatches The entire report has been searched. Het volledige rapport is doorzocht.
    NullCheckBoxText NULL Geen waarde
    NullValueText Null Geen waarde
    PageOf of van
    ParameterAreaButtonToolTip Show / Hide Parameters Toon / Verberg Parameters
    PasswordPrompt Password: Wachtwoord:
    PreviousPageButtonToolTip Previous Page Vorige Pagina
    PrintButtonToolTip Print Afdrukken
    ProgressText Loading... Verwerken...
    RefreshButtonToolTip Refresh Vernieuwen
    SearchTextBoxToolTip Find Text in Report Zoek naar tekst binnen het rapport
    SelectAValue <Select a Value> <Selecteer een waarde>
    SelectAll (Select All) (Selecteer alles)
    SelectFormat Select a format Selecteer een formaat
    TextNotFound The search text was not found. De zoektekst is niet gevonden.
    TodayIs Today is {0} Vandaag is {0}
    TrueValueText True Waar
    UserNamePrompt Log In Name: Gebruikersnaam:
    View Report ViewReportButtonText Toon Rapport
    ZoomControlToolTip Zoom Zoom
    ZoomToPageWidth Page Width Paginabreedte
    ZoomToWholePage Whole Page Volledige pagina

    IReportViewerMessages2

    物业名称 原始英文价值 荷兰语翻译
    ClientNoScript Your browser does not support scripts or has been configured not to allow scripts. Uw browser ondersteunt geen JavaScript of deze ondersteuning is uitgeschakeld.
    ClientPrintControlLoadFailed Unable to load client print control. Het laden van het client print control is niet gelukt.
    ParameterDropDownToolTip Select a value Selecteer een waarde

    IReportViewerMessages3

    物业名称 原始英文价值 荷兰语翻译
    CalendarLoading Loading... Verwerken...
    CancelLinkText Cancel Annuleer

    附加条款

    • 返回null将使ReportViewer默认返回原始值。将此属性用于不希望转换的字符串属性或方法。
    • 要使ReportViewer接管您的自定义实施,需要更改应用程序的web.config或app.config。将以下行添加到您的appSettings中,并用实现类及其所在的程序集的名称替换MyClass和MyAssembly。

马丁·戴维勒斯

查看资料

10条评论

  1. 这是您需要在web.config中实现的键,以使ReportViewer加载已实现的类。

    comaunite/ 6年前

  2. comaunite/ 6年前

  3. http://msdn.microsoft.com/en-us/library/microsoft.reporting.webforms.ireportviewermessages2.aspx

    在那里,您可以在web.config中找到所需的密钥,以便ReportViewer加载您的类。(对垃圾评论很抱歉,网站似乎删除了这些标签(或尝试使用该标签))

    comaunite/ 6年前

    • 谢谢,看来您并不是唯一一个在使用标签的人:片段实际上是在博客的末尾,在“将以下行添加到您的appSettings中,并用实现类的名称和MyClass和MyAssembly代替”,但当我发布博客时似乎已被省略。我将查看是否可以还原该代码段。再次感谢您的关注

      马丁·戴维勒斯/ 6年前

  4. 这是VS2005的吗,因为我使用2008,所以我得到了更多的字符串。

    斯塔凡·维尔坎斯/ 6年前

    • 您还会看到哪些额外的字符串?您是否实现了IReportViewerMessages,IReportViewerMessages2和IReportViewerMessages3?

      马丁·戴维勒斯/ 6年前

  5. 嗨,马丁,
    我对Reportviewer有一个不同的问题。我想在reportviewer中显示HTM1。我注意到内容并未呈现所有HTM1标签。有没有解决的办法,或者没有可能性,
    我有一个保存HTML内容(即HTML标签)的字段,所以我需要将其显示在reportviewer中。让我知道是否有任何可能性

    Jiju/ 6年前

  6. 非常感谢,辛苦了。我整日忙于搜索如何更改默认验证消息,发现只有答案“无法完成”。在这里!(实际上,我错过了这2个其他接口)

    谢谢
    Slawek

    斯拉维克/ 5年前

  7. 这可以正常工作,但是当报表中有下拉菜单时,当我从下拉菜单中选择一个新值并单击“查看报表”按钮时,控件默认为英语。请帮助我解决这个问题。

    马达里/ 4年前

  8. 非常感谢。有没有一种方法可以本地化警报
    “为报告参数…提供的值对其类型无效。(rsReportParameterTypeMismatch)”?

https://tutorialmore.com/questions-364157.htm

我在ASP.NET MVC应用程序中使用报表查看器来查看报表。我的系统和浏览器文化是法语。当您在Visual Studio中打开报表或直接从服务器(在浏览器中)打开时,界面为法语。但是,使用reportviewer时,界面为英语。我如何用法语获得它?

尝试将页面文化设置为法语,如下所示:

  1. (`UICulture="fr-FR"`)

或将组装文化从中性更改为自动:

  1. <%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=auto`...

但是,没有结果。

  1. System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("fr-FR");
  2. String reportFolder = System.Configuration.ConfigurationManager.AppSettings["SSRSReportsFolder"].ToString();
  3. rvSiteMapping.Height = Unit.Pixel(Convert.ToInt32(Request["Height"]) - 58);
  4. rvSiteMapping.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
  5. rvSiteMapping.ServerReport.ReportServerUrl = new Uri("http://server/PREPROD/");
  6. rvSiteMapping.ServerReport.ReportPath = String.Format("/{0}/{1}", reportFolder, Request["ReportName"].ToString());
  7. rvSiteMapping.ServerReport.Refresh();

C#

报告查看器

  • 解决的方法1

    我正在尝试通过以下信息解决此问题:https://devillers.nl/blog/localizing-microsoft-reportviewer/

    这个想法是实现以下接口:

    1. public class FrenchReportViewerMessages : IReportViewerMessages, IReportViewerMessages2, IReportViewerMessages3
    2. {
    3. #region IReportViewerMessages Members
    4. // English value: Back to Parent Report
    5. public string BackButtonToolTip
    6. {
    7. get { return "Terug naar het vorige rapport"; }
    8. }
    9. ...

    并将以下内容添加到web.config中:

    1. <add key="ReportViewerMessages" value="FrenchReportViewerMessages, MyAssembly" />

    似乎是一种解决方案,但现在我得到一个错误:找不到类型'FrenchReportViewerMessages,MyAssembly'

第一次使用接口 --ReportViewer改变显示语言

学会使用msdn

ReportViewer是一个winform控件,想让控件里文本全部显示为英文。

因为是微软封装的,所以无法直接改动,这是就应该考虑微软会提供接口。

搜索发现ReportViewer有实现本地化的IReportViewerMessages3接口,它继承IReportViewerMessages,IReportViewerMessages2.

三个接口很类似应该都看一下,在注释和示例里会描述怎么使用接口,IReportViewerMessages3只有注释,没有示例,看了还不清楚该怎么用,幸好在IReportViewerMessages里看到了示例,根据注释的描述和示例的代码基本可以看懂怎么使用IReportViewerMessages3接口了。

本地化Microsoft ReportViewer相关推荐

  1. 在Sharepoint 2010中使用ReportViewer控件展示RDLC报表

    微软的Visual studio提供了ReportViewer控件以及RDLC报表设计工具.下文主要介绍如何在Sharepoint 2010项目开发中使用ReportViewer和RDLC生成项目报表 ...

  2. MICROSOFT REPORT VIEWER 2012之无法加载相关的dll

    使用VS 2012开发报表, 如果是使用的微软的报表控件的话,默认是使用的MICROSOFT REPORT VIEWER 2012,本地开发基本上没问题,但是一发布服务器,就会发现坑了,微软挖坑从来就 ...

  3. ReportViewer 安装

    选择"工具">"Nuget包管理器">"程序包管理器控制台" 执行命令:Install-Package Microsoft.Re ...

  4. 微软ReportViewer(rdlc)发布时所需要的动态库(vs2010)

    使用微软的ReportViewer时,也就是微软vs2010自带报表.在发布如果没有打包或整理动态库,会报缺少动态库文件.经过测试目前来看把如下三个动态库放到可执行文件根目录下就可以正常运行. Mic ...

  5. VS2019 ReportViewer报表控件及设计器安装方法

    1.报表控件: 单机工具→NuGet包浏览器→程序包管理控制台 在最底下输入此命令:Install-Package Microsoft.ReportingServices.ReportViewerCo ...

  6. VS2017使用ReportViewer报表组件

    一.报表设计器安装(安装完成后,就可以在新建项中看到报表模版) 1. 点击工具-> 扩展和更新,下载Microsoft Rdlc报表设计器 2. 下载成功后重启VS2017,报表设计器自动安装. ...

  7. VS 2017 添加 ReportViewer

    准备工作 移除 ReportViewer 控件和卸载 Microsoft Rdlc Report Designer for Visual Studio 扩展. 这是针对已经在 VS 2017 的工具箱 ...

  8. ReportViewer 類別

    封裝用於 ReportViewer 控制項的方法和屬性. 繼承階層架構 Object   Control     WebControl       CompositeControl         M ...

  9. winForm安装ReportViewer

    在做一个小项目,想用来做表格显示数据的,找了一遍,发现DataGridView就可以用来做数据的表格显示. 后期也会用到,就把ReportViewer的安装和简单的使用写下来. 先在工具,工具箱下,浏 ...

最新文章

  1. laravel学习资料整理
  2. 【Android RTMP】Android Camera 视频数据采集预览 ( 视频采集相关概念 | 摄像头预览参数设置 | 摄像头预览数据回调接口 )
  3. 数据库-数据类型及主键外键
  4. centos+php+nginx的php.ini无法加载的问题
  5. Exchange中的数据库文件
  6. 博客园 文章和随笔区别
  7. Windows 操作小技巧 之一(持续更新)
  8. [独孤九剑]持续集成实践(二)– MSBuild语法入门
  9. php 面向对象编程(class)之从入门到崩溃 基础篇
  10. Vsftp的PASV模式和Port模式及VsFTP配置方案
  11. 【Java与智能设备】Ch0402 Activity的生命周期
  12. 【Python】Python第三方库概览
  13. LeaRun快速开发平台:企业供应链管理系统解决方案
  14. JS短文 | 3分钟了解下 JS Sets 集合
  15. Odoo 16 企业版手册 - 库存管理之产品类别
  16. Django - Celery使用及介绍
  17. js jquery给input标签赋值、取值
  18. Sql Server 快捷键
  19. 【翻译】WF从入门到精通(第八章):调用外部方法及工作流
  20. 攻防世界(PWN)forgot

热门文章

  1. java中的数组初始化
  2. 在麒麟V10操作系统上安装MySQL数据库
  3. WebGL学习笔记(3)
  4. Spark AQE中的CoalesceShufflePartitions和OptimizeLocalShuffleReader
  5. 添加阿里云人脸识别的依赖Duplicate class org.xml.sax.helpers.XMLReaderFactory found in modules jetified-pull-pars
  6. 视频怎么录制鼠标?有什么需要注意的事项?
  7. SSH终端远程复制:scp命令详解
  8. mysql适合储存高清电影的数据类型_下面选项中,适合存储高清电影的数据类型是 (5.0分)_学小易找答案...
  9. 做程序员需要学历吗?
  10. 时序预测工具库(Prophet)介绍+代码