We are using a website that has a code page with the following at the top.
Imports Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution
Inside the code page Class we have a function that uses the above to render an SSRS report to PDF and save it to a file and it works perfectly. We tried to do the same on a new website on the same IIS server but are getting red underline errors in Visual Studio. I assume that I am missing something (reference or ???) on the new website but cannot figure it out. Below is a sample of some of the code at the top of the function.
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 = "1"
For example I get underlined error on the following lines.
Dim warningsAs Warning() = Nothing
Dim rsAsNew ReportExecutionService()
Dim parametersAs ParameterValue()
I have no such problems on the first website. Thanks.