visual-studio-2008 - Visual Studio 2010是否要求将在VS2008上创建的RDLC转换为RDLC 2008格式?

标签 visual-studio-2008 visual-studio-2010 rdlc reportviewer2008

我已经在Visual Studio 2008上创建了我的项目,以及在其上的RDLC文件。
但是现在,当我在Visual Studio 2010上打开解决方案并想要打开RDLC文件时,它向我显示警告。

有点可笑。该报告是在VS2008上创建的,而VS2010要求转换为2008格式。也许我的VS2008安装存在问题,该问题使用某种古老的格式创建了RDLC文件(2005 ??!)。

问题是,当您单击“确定”按钮确认时,进行一些设计调整并运行该应用程序,会在“主报告”上引发错误:

ex.InnerException
{"The definition of the report 'Main Report' is invalid."}
    [Microsoft.Reporting.DefinitionInvalidException]: {"The definition of the report 'Main Report' is invalid."}
    Data: {System.Collections.ListDictionaryInternal}
    HelpLink: null
    InnerException: {"The report definition is not valid.  Details: The report definition has an invalid target namespace 'http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition' which cannot be upgraded."}
    Message: "The definition of the report 'Main Report' is invalid."
    Source: "Microsoft.ReportViewer.Common"
    StackTrace: "   at Microsoft.Reporting.ReportCompiler.CompileReport(CatalogItemContext context, Byte[] reportDefinition, Boolean generateExpressionHostWithRefusedPermissions, ReportSnapshotBase& snapshot)\r\n   at Microsoft.Reporting.StandalonePreviewStore.StoredReport.CompileReport()\r\n   at Microsoft.Reporting.StandalonePreviewStore.StoredReport.get_Snapshot()\r\n   at Microsoft.Reporting.StandalonePreviewStore.GetCompiledReport(CatalogItemContext context, Boolean rebuild, ReportSnapshotBase& snapshot)\r\n   at Microsoft.Reporting.LocalService.GetCompiledReport(CatalogItemContext itemContext, Boolean rebuild, ReportSnapshotBase& snapshot)\r\n   at Microsoft.Reporting.LocalService.CompileReport(CatalogItemContext itemContext, Boolean rebuild)\r\n   at Microsoft.Reporting.WinForms.LocalReport.CompileReport()"
    TargetSite: {Microsoft.ReportingServices.ReportProcessing.PublishingResult CompileReport(Microsoft.ReportingServices.Diagnostics.CatalogItemContext, Byte[], Boolean, Microsoft.ReportingServices.Library.ReportSnapshotBase ByRef)}

最佳答案

将rdlc的早期版本转换为VS2010时遇到类似的问题。转换很好,需要进行的操作是必须将对Microsoft.ReportViwer.Common的引用从版本9更改为版本10。对Microsoft.ReportViewer.WebForms也执行相同的操作。您还需要在web.config和包含ReportViewer控件的页面中将版本9的所有引用更改为版本10。这解决了我的所有问题,并且能够在VS2010中修改报告。

关于visual-studio-2008 - Visual Studio 2010是否要求将在VS2008上创建的RDLC转换为RDLC 2008格式?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2906626/

相关文章:

asp.net - 如何在RDLC报告中绑定(bind)Excel公式

c# - 从引用中删除版本号(避免 "Could not load file or assembly..."错误)?

c - GCC 与 MSVC 编译器

reportviewer - RDLC-Report 中的空页

whitespace - 在rdlc文件中隐藏文本框时保留空白

vb.net - 如何在 VS 2010 项目中定义 'Start external program' 的相对路径?

C# 为 xml 可序列化类创建 XSD 的最简单方法是什么

javascript - Qt Webkit : Not allowed to load local resource

c++ - 与声明分开定义模板类的模板成员

visual-studio-2010 - Visual Studio 2010 构建后崩溃