Подтвердить что ты не робот

Есть ли в WinForms ReportViewer дополнительные зависимости развертывания в .NET 4.0?

Недавно я обновил приложение WinForms от .NET 3.5 до .NET 4.0, которое содержит локальные отчеты. Я включаю сборки версии 11.0 для Microsoft.ReportViewer.WinForms, Microsoft.ReportViewer.Common и Microsoft.ReportViewer.ProcessingObjectModel в каталог приложения, который требуется всего лишь для развертывания этого приложения с помощью .NET 3.5, но я получаю следующую ошибку на целевой машине с .NET 4.0, но без VisualStudio или SQL Server:

TYPE: Microsoft.Reporting.WinForms.LocalProcessingException
MSG: An error occurred during local report processing.
SOURCE: Microsoft.ReportViewer.WinForms
SITE: EnsureExecutionSession
   at Microsoft.Reporting.WinForms.LocalReport.EnsureExecutionSession()
   at Microsoft.Reporting.WinForms.LocalReport.SetParameters(IEnumerable`1 parameters)
   at Ceoimage.Basecamp.MaintainDocumentIntegrity.ReportContainer._SetReportParameters(String departmentName, String footer)
   at Ceoimage.Basecamp.MaintainDocumentIntegrity.ReportContainer._RefreshReport(DataTable sourceTable, String sourceName, String reportResourceName, String departmentName, String footer)
   at Ceoimage.Basecamp.MaintainDocumentIntegrity.ReportContainer.ShowMissingReport(MissingFilesDataTable missingTable, String departmentName, String footer)
   at Ceoimage.Basecamp.MaintainDocumentIntegrity.DocumentIntegrityForm._HandleMissingComplete(Object sender, RunWorkerCompletedEventArgs e)

-- INNER EXCEPTION --
TYPE: Microsoft.Reporting.DefinitionInvalidException
MSG: The definition of the report '' is invalid.
SOURCE: Microsoft.ReportViewer.Common
SITE: CompileReport
   at Microsoft.Reporting.ReportCompiler.CompileReport(ICatalogItemContext context, Byte[] reportDefinition, Boolean generateExpressionHostWithRefusedPermissions, ControlSnapshot& snapshot)
   at Microsoft.Reporting.LocalService.GetCompiledReport(PreviewItemContext itemContext, Boolean rebuild, ControlSnapshot& snapshot)
   at Microsoft.Reporting.LocalService.CompileReport()
   at Microsoft.Reporting.LocalService.Microsoft.Reporting.ILocalProcessingHost.CompileReport()
   at Microsoft.Reporting.WinForms.LocalReport.EnsureExecutionSession()

-- INNER EXCEPTION --
TYPE: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException
MSG: An unexpected error occurred in Report Processing.
SOURCE: Microsoft.ReportViewer.Common
SITE: CreateIntermediateFormat
   at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.CreateIntermediateFormat(PublishingContext reportPublishingContext, IDataProtection dataProtection)
   at Microsoft.Reporting.ReportCompiler.CompileReport(ICatalogItemContext context, Byte[] reportDefinition, Boolean generateExpressionHostWithRefusedPermissions, ControlSnapshot& snapshot)

-- INNER EXCEPTION --
TYPE: System.IO.FileNotFoundException
MSG: Could not load file or assembly 'Microsoft.SqlServer.Types, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.
SOURCE: Microsoft.ReportViewer.Common
SITE: Write
FILE: Microsoft.SqlServer.Types, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91
   at Microsoft.ReportingServices.ReportIntermediateFormat.Persistence.IntermediateFormatWriter.Write(Object obj, Boolean verify, Boolean assertOnInvalidType)
   at Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo.Serialize(IntermediateFormatWriter writer)
   at Microsoft.ReportingServices.ReportIntermediateFormat.Persistence.IntermediateFormatWriter.Write(IPersistable persistableObj, Boolean verify)
   at Microsoft.ReportingServices.ReportIntermediateFormat.Persistence.IntermediateFormatWriter.WriteVariantOrPersistable(Object obj)
   at Microsoft.ReportingServices.ReportPublishing.ReportPublishing.CreateHashForCachedDataSets()
   at Microsoft.ReportingServices.ReportPublishing.ReportPublishing.InternalCreateIntermediateFormat(Stream definitionStream, String& description, String& language, ParameterInfoCollection& parameters, DataSourceInfoCollection& dataSources, DataSetInfoCollection& sharedDataSetReferences, UserLocationFlags& userReferenceLocation, ArrayList& dataSetsName, Boolean& hasExternalImages, Boolean& hasHyperlinks, Byte[]& dataSetsHash)
   at Microsoft.ReportingServices.ReportPublishing.ReportPublishing.CreateIntermediateFormat(Byte[] definition, String& description, String& language, ParameterInfoCollection& parameters, DataSourceInfoCollection& dataSources, DataSetInfoCollection& sharedDataSetReferences, UserLocationFlags& userReferenceLocation, ArrayList& dataSetsName, Boolean& hasExternalImages, Boolean& hasHyperlinks, Byte[]& dataSetsHash)
   at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.CompileOdpReport(PublishingContext reportPublishingContext, IDataProtection dataProtection, PublishingErrorContext errorContext, String& reportDescription, String& reportLanguage, ParameterInfoCollection& parameters, DataSourceInfoCollection& dataSources, DataSetInfoCollection& sharedDataSetReferences, UserLocationFlags& userReferenceLocation, ArrayList& dataSetsName, Boolean& hasExternalImages, Boolean& hasHyperlinks, Byte[]& dataSetsHash)
   at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.CreateIntermediateFormat(PublishingContext reportPublishingContext, IDataProtection dataProtection)

Я попробовал запустить Report Viewer 2012 Redistributable, но он тоже жалуется на Microsoft.SqlServer.Types. Я не понимаю, почему у меня эта новая зависимость, хотя это локальный отчет. Код не использует какие-либо расширенные типы данных или что-либо помимо того, что он использует в версии .NET 3.5, для которой требуются только те три сборки Microsoft.ReportViewer.*. Может ли кто-нибудь дать мне конечный список требований для развертывания приложения .NET 4.0 с помощью Report Viewer?

4b9b3361

Ответ 1

Ссылка, которую вы предоставили для Распространяемого Report Reporter 2012, имеет некоторую информацию в самом низу.

Дополнительная информация

Предварительные требования Службы Reporting Services Microsoft SQL Server 2008 или выше для режима обработки сервера .NET Framework 3.5 с пакетом обновления 1 (SP1) или .NET Framework 4.0 Пакет типов CLR типов SQL Server

Похоже, вам не хватает пакета CLR типов SQL Server System. Его можно загрузить с помощью пакета функций SQL Server - вот ссылка на последний список установщиков пакета функций.

http://www.microsoft.com/en-us/download/details.aspx?id=26728 Вы увидите несколько списков в зависимости от x86 и т.д.

Надеюсь, это поможет.

Ответ 2

Основная причина этой ошибки заключается в том, что проект или файл установки не могут получить доступ к dll view viewer dll, поэтому добавьте все следующие файлы dll, относящиеся к reportviewer вручную

  • Microsoft.ReportViewer.Common
  • Microsoft.ReportViewer.ProcessingObjectModel
  • Microsoft.ReportViewer.WinForms
  • Microsoft.ReportViewer.DataVisualization

Теперь я надеюсь, что эта ошибка будет решена легко.

Ответ 3

В разделе "Управление пакетами NuGet" добавьте: