Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does the WinForms ReportViewer have additional deployment dependencies in .NET 4.0?

I recently updated a WinForms app from .NET 3.5 to .NET 4.0 that contains local reports. I include the version 11.0 assemblies for Microsoft.ReportViewer.WinForms, Microsoft.ReportViewer.Common, and Microsoft.ReportViewer.ProcessingObjectModel in the application directory, which is all it took to deploy this app using .NET 3.5, but I get the following error on a target machine with .NET 4.0 but no VisualStudio or 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)

I tried running the Report Viewer 2012 Redistributable, but it too complains about Microsoft.SqlServer.Types. I do not understand why I have this new dependency even though this is a local report. The code does not use any advanced data types or anything beyond what it uses in the .NET 3.5 version that requires only those three Microsoft.ReportViewer.* assemblies. Can someone give me a finite list of requirements for deploying a .NET 4.0 app with Report Viewer?

like image 655
flipdoubt Avatar asked Feb 04 '13 22:02

flipdoubt


1 Answers

The link you provided for the Report Viewer 2012 Redistributable has some information at the very bottom.

Additional information

Pre-requisites Microsoft SQL Server 2008 Reporting Services or higher for server processing mode. NET Framework 3.5 SP1 or .NET Framework 4.0 The SQL Server System CLR Types package

Looks like you are missing the SQL Server System CLR Types package. It can be downloaded from the SQL Server Feature Pack - here is a link to the latest list of installers of the feature pack.

http://www.microsoft.com/en-us/download/details.aspx?id=26728 You will see multiple listings depending on x86 etc.

Hopefully this will help.

like image 152
Scott Wylie Avatar answered Oct 18 '22 16:10

Scott Wylie