我的应用程序(winforms .net 2.0 / vs2008)在我的开发机器上工作正常,但在其中一台测试机上我得到了这个例外。 有没有人遇到类似的东西?
************** 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
答案 0 :(得分:0)
我曾经有类似的东西。您可能希望确保测试计算机在GAC中安装了ReportViewer dll。 Microsoft创建了installer以使其更容易。
问题:您是否在本地模式下使用Reporting Services并在winforms中使用报表查看器控件?
答案 1 :(得分:0)
报告和报告查看器的vs2008设计器不向后兼容2.0。同样,您无法使用vs2008设计2005年报告 - 这可能是您的问题。
答案 2 :(得分:0)
我的安装程序会复制所有必需的dll
Microsoft.ReportViewer.Common.dll
Microsoft.ReportViewer.ProcessingObjectModel.dll
Microsoft.ReportViewer.Winforms.dll
到ProgramFiles / myAppname文件夹。
它在Vista / XP上完美运行,但问题出在Win98上。 我会尝试在GAC上安装这些dll,也许这是一个问题。我正试图避免在我的安装程序中运行额外的安装程序。
@ keithwarren7:
如果这是真的,那真是太愚蠢了。你知道任何简单的& .net 2.0的免费报告引擎?