Answered by:
Type 'Warning' is not declared

Question
-
User1510859543 posted
We copied a website and SQL database from a 2008R2 Server to a 2016 Server and are getting the error above on a code page on the new server. This happened once before and old notes indicate was fixed by adding a reference to Microsoft.ReportViewer.WebForms dll but that was done when it was on the 2008R2 Server and all files and folders of the website were copied to the new 2016 server and web application in IIS. How can I resolve this issue? Below is code from the module where it is failing. The error points to the line that says
Dim warnings As Warning() = Nothing
Imports System Imports System.IO Imports Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution Imports System.Data.OleDb Imports Microsoft.VisualBasic Imports System.Data Imports System.Drawing Imports System.Drawing.Imaging Public Shared Function CreatePDFReport(ByVal strReportName As String, _ ByVal intRecordID As Int32, _ Optional ByVal intType As Int16 = 1) As String Dim strReturn As String = "" ' Output variables Dim encoding As String Dim mimeType As String Dim extension As String Dim warnings As Warning() = Nothing Dim streamIDs As String() = Nothing ' ReportExecution object prepare Dim rs As New ReportExecutionService() rs.Credentials = System.Net.CredentialCache.DefaultCredentials rs.Url = UtilClass.GetReportServerPath & "/ReportExecution2005.asmx" ' Render arguments Dim result As Byte() = Nothing Dim strFileName As String = "" Dim reportPath As String = "/BodyShopReports/" Dim format As String = "PDF" Dim historyID As String = Nothing Dim devInfo As String = "<DeviceInfo><Toolbar>False</Toolbar></DeviceInfo>" Dim strOutputPath As String = HttpContext.Current.Server.MapPath("~/OfficeDocs/POFiles") ' Prepare report parameters Dim parameters As ParameterValue() Select Case strReportName Case "WorkAuthorization" parameters = New ParameterValue(1) {} parameters(0) = New ParameterValue() parameters(0).Name = "RecordID" parameters(0).Value = intRecordID parameters(1) = New ParameterValue() parameters(1).Name = "ReportType" parameters(1).Value = intType strFileName &= "\WorkAuth" & intRecordID.ToString Case "CustomerBilling" parameters = New ParameterValue(1) {} parameters(0) = New ParameterValue() parameters(0).Name = "RecordID" parameters(0).Value = intRecordID parameters(1) = New ParameterValue() parameters(1).Name = "ReportType" parameters(1).Value = intType strFileName &= "\FinalBill" & intRecordID.ToString Case "TasksAtDropOff" parameters = New ParameterValue(1) {} parameters(0) = New ParameterValue() parameters(0).Name = "RecordID" parameters(0).Value = intRecordID strFileName &= "\TasksAtDropOff" & intRecordID.ToString Case Else End Select Dim strFullPath As String = strOutputPath & strFileName & ".pdf" If File.Exists(strFullPath) Then '1-7-2015 added below to avoid exception error when same file name used Dim strTime As String = Microsoft.VisualBasic.Format(DateTime.Now, "hhmmss") strFileName &= strTime strFullPath = strOutputPath & strFileName & ".pdf" End If If File.Exists(strFullPath) = False Then ' Prepare render Dim execInfo As New ExecutionInfo() Dim execHeader As New ExecutionHeader() rs.ExecutionHeaderValue = execHeader execInfo = rs.LoadReport(reportPath & strReportName, historyID) rs.SetExecutionParameters(parameters, "en-us") Dim SessionId As [String] = rs.ExecutionHeaderValue.ExecutionID ' Actual render result = rs.Render(format, devInfo, extension, encoding, mimeType, warnings, streamIDs) execInfo = rs.GetExecutionInfo() ' Write to file Dim stream As FileStream = File.Create(strOutputPath & strFileName & ".pdf", result.Length) stream.Write(result, 0, result.Length) stream.Close() stream.Dispose() End If strReturn = strFullPath Return strReturn End Function
Monday, January 8, 2018 9:54 PM
Answers
-
User1510859543 posted
Solved my problem. Apparently, the ReportExecutionService() requires some dll's that are installed as part of installing the ReportViewer runtime found at link below.
https://www.microsoft.com/en-us/download/details.aspx?id=6442
Once I installed it on the new server then everything worked fine. FYI.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, February 7, 2018 6:15 PM
All replies
-
User347430248 posted
Hi dlchase,
what if you try like below.
Dim streamIDs As String() streamIDs = Nothing
if that not work then try to assign empty string like "" and check whether it solve the error or not.
let me know about your testing result, I will try to provide further suggestions if needed.
Regards
Deepak
Tuesday, January 9, 2018 9:47 AM -
User1510859543 posted
It throws the same error and on the "Dim" line.
Also, if I comment out the Dim line then the same error shows up a few lines down on the line below.
Dim rs As New ReportExecutionService()
Below is where this class type is referenced.
https://msdn.microsoft.com/en-us/library/reportexecution2005.warning.aspx
Tuesday, January 9, 2018 2:38 PM -
User475983607 posted
This is an assembly reference error and indicates ReportExecution2005.dll is not in the bin folder or the file was originally located in the GAC, usually from an install, and the new system does not have the assemblies in the GAC.
Try looking at the references in the reference folder in solution explorer. Are there issues with the reference? Maybe the ReportExecution2005.dll file does not exist. Also, take a look at references in the the working app. You might try copying the dll from the old system to the new system. Also, keep in mind that the assembly has been deprecated in SQL 2008 R2. You might want to look into updating to the latest services in SSRS.
Tuesday, January 9, 2018 3:49 PM -
User1510859543 posted
There is no ReportExecution2005.dll file on either server (dev or prod). Yet the website on dev server (2016 server and sql 2016) works perfectly. The only difference is that the dev server was upgraded from 2012R2 to 2016 on both windows server and sql server. The website was copied from the dev server to the production server so both have the exact same bin and web pages/code.
What assembly was depreciated?
Tuesday, January 9, 2018 6:15 PM -
User475983607 posted
There is no ReportExecution2005.dll file on either server (dev or prod).Confused, this is an error on your dev box right? Did you actually look at the project references?
Tuesday, January 9, 2018 6:36 PM -
User1510859543 posted
No. The dev box works fine. It is the prod box that is giving the error.
Tuesday, January 9, 2018 6:44 PM -
User475983607 posted
dlchase
No. The dev box works fine. It is the prod box that is giving the error.
Are you seeing this error in Visual Studio on the production server or is it a run-time error?
Tuesday, January 9, 2018 6:46 PM -
User1510859543 posted
It is a run time error. It happens when I first try to open the website. I guess in the compilation of the site.
Tuesday, January 9, 2018 6:48 PM -
User475983607 posted
Perhaps you need to refresh the server reference, you are missing the web service references folder, missing an xsd file, or the service URL path is not correct.
Tuesday, January 9, 2018 6:59 PM -
User1510859543 posted
Sorry...you lost me here. What am I missing?
Tuesday, January 9, 2018 8:29 PM -
User1510859543 posted
I added below to the top of the page throwing the error.
Imports Microsoft.Reporting.WebForms
Now it gets past the "Dim warnings As Warning()" line but then fails with error "Type 'ReportExecutionService' is not defined" on line below.
Dim rs As New ReportExecutionService()
Hope this helps.
Tuesday, January 9, 2018 9:42 PM -
User1510859543 posted
Not sure if this helps but when I get the runtime error I clicked on the "Show Detailed Compiler Output" link on the browser error display and got the below output. It would appear that all of the problems relate to the assembly that holds the ReportExecutionService class or ???
c:\windows\system32\inetsrv> "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\vbc.exe" /t:library /utf8output /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\bodyshop\a1b83930\fa9257bf\assembly\dl3\5ac3f775\20fbceea_229dce01\HtmlAgilityPack.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Web\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.IdentityModel\v4.0_4.0.0.0__b77a5c561934e089\System.IdentityModel.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\bodyshop\a1b83930\fa9257bf\assembly\dl3\ba5ec874\333a2b41_fc4fce01\Microsoft.Web.GeneratedImage.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\bodyshop\a1b83930\fa9257bf\assembly\dl3\2a6d9acf\00d0de48_3d44d001\System.Data.RSSBus.QuickBooks.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\bodyshop\a1b83930\fa9257bf\assembly\dl3\13643302\a0ee8775_f091ce01\itextsharp.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Services\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Data.Linq.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\bodyshop\a1b83930\fa9257bf\assembly\dl3\f44e3a1f\a96692da_4661ce01\Microsoft.ReportViewer.WebForms.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.Build.Framework\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.Build.Framework.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\bodyshop\a1b83930\fa9257bf\assembly\dl3\dbfdb70a\ea863816_ce7fcd01\PdfSharp.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activation\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activation.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\DocumentFormat.OpenXml\v4.0_2.5.5631.0__31bf3856ad364e35\DocumentFormat.OpenXml.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\bodyshop\a1b83930\fa9257bf\assembly\dl3\26fd37be\00c757ed_cf39cf01\System.Data.RSSBus.Email.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.Services.Design\v4.0_4.0.0.0__b77a5c561934e089\System.Data.Services.Design.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_64\System.Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\WindowsBase\v4.0_4.0.0.0__31bf3856ad364e35\WindowsBase.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_64\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\bodyshop\a1b83930\fa9257bf\assembly\dl3\372b0edd\9d0158e3_983ccf01\App_Licenses.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.ApplicationServices\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.ApplicationServices.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.DynamicData\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.DynamicData.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Design\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Design.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.DataSetExtensions\v4.0_4.0.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\bodyshop\a1b83930\fa9257bf\assembly\dl3\5381fc26\68a8b5e9_229dce01\AjaxControlToolkit.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.DataVisualization\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.DataVisualization.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\bodyshop\a1b83930\fa9257bf\assembly\dl3\a07fc034\f9a36eda_4661ce01\Microsoft.ReportViewer.Common.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.Entity\v4.0_4.0.0.0__b77a5c561934e089\System.Data.Entity.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\bodyshop\a1b83930\fa9257bf\assembly\dl3\92654940\005fcee3_cf39cf01\RSSBus.Email.System.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\bodyshop\a1b83930\fa9257bf\assembly\dl3\5f779a11\a41e14eb_229dce01\AjaxMin.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Extensions.Design\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.Extensions.Design.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.Services.Client\v4.0_4.0.0.0__b77a5c561934e089\System.Data.Services.Client.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.Activities.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activities.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Extensions\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.Extensions.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ComponentModel.DataAnnotations\v4.0_4.0.0.0__31bf3856ad364e35\System.ComponentModel.DataAnnotations.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_64\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel\v4.0_4.0.0.0__b77a5c561934e089\System.ServiceModel.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.WorkflowServices\v4.0_4.0.0.0__31bf3856ad364e35\System.WorkflowServices.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll" /out:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\bodyshop\a1b83930\fa9257bf\App_Code.sgeyvyjv.dll" /D:DEBUG=1 /debug+ /nowarn:41008,40000,40008 /define:_MYTYPE=\"Web\" /imports:Microsoft.VisualBasic,System,System.Collections,System.Collections.Generic,System.Collections.Specialized,System.ComponentModel.DataAnnotations,System.Configuration,System.Linq,System.Text,System.Text.RegularExpressions,System.Web,System.Web.Caching,System.Web.DynamicData,System.Web.SessionState,System.Web.Security,System.Web.Profile,System.Web.UI,System.Web.UI.WebControls,System.Web.UI.WebControls.WebParts,System.Web.UI.HtmlControls,System.Xml.Linq /warnaserror- /optionInfer+ "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\bodyshop\a1b83930\fa9257bf\App_Code.sgeyvyjv.7.vb" "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\bodyshop\a1b83930\fa9257bf\App_Code.sgeyvyjv.8.vb" "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\bodyshop\a1b83930\fa9257bf\App_Code.sgeyvyjv.12.vb" "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\bodyshop\a1b83930\fa9257bf\App_Code.sgeyvyjv.5.vb" "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\bodyshop\a1b83930\fa9257bf\App_Code.sgeyvyjv.10.vb" "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\bodyshop\a1b83930\fa9257bf\App_Code.sgeyvyjv.2.vb" "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\bodyshop\a1b83930\fa9257bf\App_Code.sgeyvyjv.11.vb" "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\bodyshop\a1b83930\fa9257bf\App_Code.sgeyvyjv.9.vb" "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\bodyshop\a1b83930\fa9257bf\App_Code.sgeyvyjv.0.vb" "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\bodyshop\a1b83930\fa9257bf\App_Code.sgeyvyjv.1.vb" "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\bodyshop\a1b83930\fa9257bf\App_Code.sgeyvyjv.3.vb" "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\bodyshop\a1b83930\fa9257bf\App_Code.sgeyvyjv.4.vb" "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\bodyshop\a1b83930\fa9257bf\App_Code.sgeyvyjv.13.vb" "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\bodyshop\a1b83930\fa9257bf\App_Code.sgeyvyjv.6.vb" Microsoft (R) Visual Basic Compiler version 14.6.1586 for Visual Basic 2012 Copyright (c) Microsoft Corporation. All rights reserved. This compiler is provided as part of the Microsoft (R) .NET Framework, but only supports language versions up to Visual Basic 2012, which is no longer the latest version. For compilers that support newer versions of the Visual Basic programming language, see http://go.microsoft.com/fwlink/?LinkID=533241 E:\shared\apps\BodyShop\App_Code\FilesClass.vb(4) : warning BC40056: Namespace or type specified in the Imports 'Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. Imports Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ E:\shared\apps\BodyShop\App_Code\FilesClass.vb(98) : error BC30002: Type 'ReportExecutionService' is not defined. Dim rs As New ReportExecutionService() ~~~~~~~~~~~~~~~~~~~~~~ E:\shared\apps\BodyShop\App_Code\FilesClass.vb(112) : error BC30002: Type 'ParameterValue' is not defined. Dim parameters As ParameterValue() ~~~~~~~~~~~~~~ E:\shared\apps\BodyShop\App_Code\FilesClass.vb(115) : error BC30002: Type 'ParameterValue' is not defined. parameters = New ParameterValue(1) {} ~~~~~~~~~~~~~~ E:\shared\apps\BodyShop\App_Code\FilesClass.vb(117) : error BC30002: Type 'ParameterValue' is not defined. parameters(0) = New ParameterValue() ~~~~~~~~~~~~~~ E:\shared\apps\BodyShop\App_Code\FilesClass.vb(120) : error BC30002: Type 'ParameterValue' is not defined. parameters(1) = New ParameterValue() ~~~~~~~~~~~~~~ E:\shared\apps\BodyShop\App_Code\FilesClass.vb(127) : error BC30002: Type 'ParameterValue' is not defined. parameters = New ParameterValue(1) {} ~~~~~~~~~~~~~~ E:\shared\apps\BodyShop\App_Code\FilesClass.vb(129) : error BC30002: Type 'ParameterValue' is not defined. parameters(0) = New ParameterValue() ~~~~~~~~~~~~~~ E:\shared\apps\BodyShop\App_Code\FilesClass.vb(132) : error BC30002: Type 'ParameterValue' is not defined. parameters(1) = New ParameterValue() ~~~~~~~~~~~~~~ E:\shared\apps\BodyShop\App_Code\FilesClass.vb(139) : error BC30002: Type 'ParameterValue' is not defined. parameters = New ParameterValue(1) {} ~~~~~~~~~~~~~~ E:\shared\apps\BodyShop\App_Code\FilesClass.vb(141) : error BC30002: Type 'ParameterValue' is not defined. parameters(0) = New ParameterValue() ~~~~~~~~~~~~~~ E:\shared\apps\BodyShop\App_Code\FilesClass.vb(162) : error BC30002: Type 'ExecutionInfo' is not defined. Dim execInfo As New ExecutionInfo() ~~~~~~~~~~~~~ E:\shared\apps\BodyShop\App_Code\FilesClass.vb(163) : error BC30002: Type 'ExecutionHeader' is not defined. Dim execHeader As New ExecutionHeader() ~~~~~~~~~~~~~~~ E:\shared\apps\BodyShop\App_Code\FilesClass.vb(197) : error BC30002: Type 'ReportExecutionService' is not defined. Dim rs As New ReportExecutionService() ~~~~~~~~~~~~~~~~~~~~~~ E:\shared\apps\BodyShop\App_Code\FilesClass.vb(211) : error BC30002: Type 'ParameterValue' is not defined. Dim parameters As ParameterValue() ~~~~~~~~~~~~~~ E:\shared\apps\BodyShop\App_Code\FilesClass.vb(214) : error BC30002: Type 'ParameterValue' is not defined. parameters = New ParameterValue(1) {} ~~~~~~~~~~~~~~ E:\shared\apps\BodyShop\App_Code\FilesClass.vb(216) : error BC30002: Type 'ParameterValue' is not defined. parameters(0) = New ParameterValue() ~~~~~~~~~~~~~~ E:\shared\apps\BodyShop\App_Code\FilesClass.vb(219) : error BC30002: Type 'ParameterValue' is not defined. parameters(1) = New ParameterValue() ~~~~~~~~~~~~~~ E:\shared\apps\BodyShop\App_Code\FilesClass.vb(226) : error BC30002: Type 'ParameterValue' is not defined. parameters = New ParameterValue(1) {} ~~~~~~~~~~~~~~ E:\shared\apps\BodyShop\App_Code\FilesClass.vb(228) : error BC30002: Type 'ParameterValue' is not defined. parameters(0) = New ParameterValue() ~~~~~~~~~~~~~~ E:\shared\apps\BodyShop\App_Code\FilesClass.vb(231) : error BC30002: Type 'ParameterValue' is not defined. parameters(1) = New ParameterValue() ~~~~~~~~~~~~~~ E:\shared\apps\BodyShop\App_Code\FilesClass.vb(238) : error BC30002: Type 'ParameterValue' is not defined. parameters = New ParameterValue(1) {} ~~~~~~~~~~~~~~ E:\shared\apps\BodyShop\App_Code\FilesClass.vb(240) : error BC30002: Type 'ParameterValue' is not defined. parameters(0) = New ParameterValue() ~~~~~~~~~~~~~~ E:\shared\apps\BodyShop\App_Code\FilesClass.vb(247) : error BC30002: Type 'ParameterValue' is not defined. parameters = New ParameterValue(1) {} ~~~~~~~~~~~~~~ E:\shared\apps\BodyShop\App_Code\FilesClass.vb(249) : error BC30002: Type 'ParameterValue' is not defined. parameters(0) = New ParameterValue() ~~~~~~~~~~~~~~ E:\shared\apps\BodyShop\App_Code\FilesClass.vb(270) : error BC30002: Type 'ExecutionInfo' is not defined. Dim execInfo As New ExecutionInfo() ~~~~~~~~~~~~~ E:\shared\apps\BodyShop\App_Code\FilesClass.vb(271) : error BC30002: Type 'ExecutionHeader' is not defined. Dim execHeader As New ExecutionHeader()
Wednesday, January 10, 2018 3:20 PM -
User475983607 posted
The error message states....
Namespace or type specified in the Imports 'Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.
Troubleshooting doc from MS
As stated above, it seems you are missing a DLL.
Wednesday, January 10, 2018 3:39 PM -
User1510859543 posted
I went to the link but correction said to open the Project Designer which I don't see. I am using VS 2010 for this project and if I open the Add References by right-click on project name I do not get any "Imported namespaces" section, only tabs for .Net, COM, etc.
Wednesday, January 10, 2018 4:56 PM -
User1510859543 posted
I agree that maybe a dll is missing but I don't know which one, where it is located and where is it referenced?
I did find this but not sure of details.
Wednesday, January 10, 2018 9:25 PM -
User1510859543 posted
Not sure if this helps, but when I get the compilation error I get the below text when I click on the "Show Detailed Compiler Output" link. Since it works on 2008R2 and 2012 I wonder if something in SQL Server 2016 SSRS has changed or???
Microsoft (R) Visual Basic Compiler version 14.6.1586
for Visual Basic 2012
Copyright (c) Microsoft Corporation. All rights reserved.This compiler is provided as part of the Microsoft (R) .NET Framework, but only supports language versions up to Visual Basic 2012, which is no longer the latest version. For compilers that support newer versions of the Visual Basic programming language, see http://go.microsoft.com/fwlink/?LinkID=533241
E:\shared\apps\BodyShop\App_Code\FilesClass.vb(4) : warning BC40056: Namespace or type specified in the Imports 'Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.
Imports Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
E:\shared\apps\BodyShop\App_Code\FilesClass.vb(101) : error BC30002: Type 'ReportExecutionService' is not defined.Dim rs As New ReportExecutionService()
Wednesday, January 17, 2018 6:35 PM -
User1510859543 posted
Does ANYBODY have a clue on this error????
Tuesday, January 30, 2018 8:57 PM -
User1510859543 posted
Solved my problem. Apparently, the ReportExecutionService() requires some dll's that are installed as part of installing the ReportViewer runtime found at link below.
https://www.microsoft.com/en-us/download/details.aspx?id=6442
Once I installed it on the new server then everything worked fine. FYI.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, February 7, 2018 6:15 PM