Microsoft Report Viewer 2008からのDefinitionInvalidException
-
19-08-2019 - |
質問
私のアプリ(winforms .net 2.0 / vs2008)は私の開発マシンでは問題なく動作しますが、テストマシンの1つではこの例外が発生します。 誰か似たようなものに遭遇しましたか?
************** Exception Text ************** Microsoft.Reporting.WinForms.LocalProcessingException: An error occurred during local report processing. ---> Microsoft.Reporting.DefinitionInvalidException: The definition of the report 'Main Report' is invalid. ---> Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: The report server has encountered a configuration error. See the report server log files for more information. at Microsoft.ReportingServices.Diagnostics.DataProtectionLocal.ProtectData(Byte[] data, Int32 dwFlags) at Microsoft.ReportingServices.DataExtensions.DataSourceInfo..ctor(String originalName, String extension, String connectionString, Boolean originalConnectStringExpressionBased, Boolean integratedSecurity, String prompt) at Microsoft.ReportingServices.ReportProcessing.ReportPublishing.ReadDataSource(DataSourceNameValidator dataSourceNames, PublishingContext context) at Microsoft.ReportingServices.ReportProcessing.ReportPublishing.ReadDataSources(PublishingContext context) at Microsoft.ReportingServices.ReportProcessing.ReportPublishing.ReadReport() at Microsoft.ReportingServices.ReportProcessing.ReportPublishing.Phase1(CatalogItemContext reportContext, Byte[] definition, CreateReportChunk createChunkCallback, CheckSharedDataSource checkDataSourceCallback, String& description, String& language, DataSourceInfoCollection& dataSources, UserLocationFlags& userReferenceLocation, Boolean& hasExternalImages, Boolean& hasHyperlinks) at Microsoft.ReportingServices.ReportProcessing.ReportPublishing.CreateIntermediateFormat(CatalogItemContext reportContext, Byte[] definition, CreateReportChunk createChunkCallback, CheckSharedDataSource checkDataSourceCallback, PublishingErrorContext errorContext, AppDomain compilationTempAppDomain, Boolean generateExpressionHostWithRefusedPermissions, String& description, String& language, ParameterInfoCollection& parameters, DataSourceInfoCollection& dataSources, UserLocationFlags& userReferenceLocation, ArrayList& dataSetsName, Boolean& hasExternalImages, Boolean& hasHyperlinks) at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.CompileReport(CatalogItemContext reportContext, Byte[] reportDefinition, CreateReportChunk createChunkCallback, CheckSharedDataSource checkDataSourceCallback, PublishingErrorContext errorContext, AppDomain compilationTempAppDomain, Boolean generateExpressionHostWithRefusedPermissions, String& reportDescription, String& reportLanguage, ParameterInfoCollection& parameters, DataSourceInfoCollection& dataSources, UserLocationFlags& userReferenceLocation, ArrayList& dataSetsName, Boolean& hasExternalImages, Boolean& hasHyperlinks) at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.CreateIntermediateFormat(CatalogItemContext reportContext, Byte[] reportDefinition, CreateReportChunk createChunkCallback, CheckSharedDataSource checkDataSourceCallback, AppDomain compilationTempAppDomain, Boolean generateExpressionHostWithRefusedPermissions) at Microsoft.Reporting.ReportCompiler.CompileReport(CatalogItemContext context, Byte[] reportDefinition, Boolean generateExpressionHostWithRefusedPermissions, ReportSnapshotBase& snapshot) --- End of inner exception stack trace --- at Microsoft.Reporting.ReportCompiler.CompileReport(CatalogItemContext context, Byte[] reportDefinition, Boolean generateExpressionHostWithRefusedPermissions, ReportSnapshotBase& snapshot) at Microsoft.Reporting.StandalonePreviewStore.StoredReport.CompileReport() at Microsoft.Reporting.StandalonePreviewStore.StoredReport.get_Snapshot() at Microsoft.Reporting.StandalonePreviewStore.GetCompiledReport(CatalogItemContext context, Boolean rebuild, ReportSnapshotBase& snapshot) at Microsoft.Reporting.LocalService.GetCompiledReport(CatalogItemContext itemContext, Boolean rebuild, ReportSnapshotBase& snapshot) at Microsoft.Reporting.LocalService.CompileReport(CatalogItemContext itemContext, Boolean rebuild) at Microsoft.Reporting.WinForms.LocalReport.CompileReport() --- End of inner exception stack trace --- at Microsoft.Reporting.WinForms.LocalReport.CompileReport() at Microsoft.Reporting.WinForms.LocalReport.SetParameters(IEnumerable`1 parameters) at XXX.Helpers.Report.PrintFavs(List`1 list, String header, String filename) in C:\Data\projects\workdir_cpv\Src\Classes\Helpers\Report.cs:line 112
解決
レポートおよびレポートビューアーのvs2008デザイナーは、2.0と下位互換性がありません。同様に、2005年のレポートをvs2008で設計することはできません。これが問題の可能性があります。
他のヒント
かつて似たようなものがありました。テストマシンのReportViewer dllがGACにインストールされていることを確認したい場合があります。 Microsoftはを作成しましたインストーラを使用してこれを簡単にします。
質問:winforms内のレポートビューアーコントロールを使用して、ローカルモードでReporting Servicesを使用していますか?
インストーラーはすべての必要なdllをコピーします
Microsoft.ReportViewer.Common.dll
Microsoft.ReportViewer.ProcessingObjectModel.dll
Microsoft.ReportViewer.Winforms.dll
ProgramFiles / myAppnameフォルダーに。
Vista / XPでは完全に動作しますが、問題はWin98にあります。 これらのdllをGACにインストールしようとしますが、それが問題になるかもしれません。インストーラー内で余分なインストーラーを実行しないようにしています。
@ keithwarren7:
それが本当なら、それは本当に愚かです。簡単な<!> ampを知っていますか。 .net 2.0用の無料レポートエンジン?