Visual Studio 2008でプロジェクトを作成し、その上にRDLCファイルを作成しました。しかし、今、Visual Studio 2010でソリューションを開き、RDLCファイルを開きたい場合、警告が表示されます。
それは少し面白いです。レポートはVS2008で作成され、VS2010は2008形式への変換を要求しています。おそらく、VS2008のインストールで、古い形式を使用してRDLCファイルを作成する問題が発生しました(2005 ??!)
問題は、[OK]ボタンで確認し、いくつかの設計調整を行ってアプリを実行すると、[メインレポート]でエラーがスローされることです。
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)}