Microsoft Report Viewer 2008 中的 DefinitionInvalidException

发布于 2024-07-09 23:13:34 字数 4624 浏览 4 评论 0原文

我的应用程序(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

My app (winforms .net 2.0 / vs2008) works fine on my dev machine but on one of test machines i'm getting this exception.
Has anybody encountered something similar?

************** 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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

遗忘曾经 2024-07-16 23:13:34

vs2008 报表设计器和报表查看器不向后兼容 2.0。 同样,您无法使用 vs2008 设计 2005 年报告 - 这可能是您的问题。

The vs2008 designer for reports and report viewer are not backwards compatible with 2.0. In the same way you cannot design 2005 reports with vs2008 - that may be your issue.

永言不败 2024-07-16 23:13:34

我曾经有过类似的事情。 您可能需要确保测试计算机的 GAC 中安装了 ReportViewer dll。 Microsoft 已创建安装程序< /a> 让这变得更容易。

问题:您是否在本地模式下使用 Reporting Services 并在 winforms 中使用报表查看器控件?

I had something similar once. You might want to make sure the test machine has the ReportViewer dll installed in the GAC. Microsoft has created an installer to make this easier.

Question: Are you using Reporting Services in local mode with a report viewer control inside winforms?

天暗了我发光 2024-07-16 23:13:34

我的安装程序将所有必需的 dll

Microsoft.ReportViewer.Common.dll

Microsoft.ReportViewer.ProcessingObjectModel.dll

Microsoft.ReportViewer.Winforms.dll

复制到 ProgramFiles/myAppname 文件夹。

它在 Vista/XP 上完美运行,但在 Win98 上出现问题。
我会尝试在 GAC 安装这些 dll,也许这是一个问题。 我试图避免在安装程序中运行额外的安装程序。

@keithwarren7:

如果这是真的,那就太愚蠢了。 你知道什么简单的& .net 2.0 的免费报告引擎?

My installer copies all required dlls

Microsoft.ReportViewer.Common.dll

Microsoft.ReportViewer.ProcessingObjectModel.dll

Microsoft.ReportViewer.Winforms.dll

to ProgramFiles/myAppname folder.

It works perfectly on Vista/XP but the issue is at Win98.
I'll try to install these dll's at GAC, maybe that's a problem. I'm trying to avoid running extra installers inside my installer.

@keithwarren7:

if that's true, then it's really stupid. do you know any simple & free report engine for .net 2.0?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文