Click here to Skip to main content
11,705,763 members (40,732 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET SQL-Server SSRS VB.NET , +
I get this error when trying to execute my SSRS reports. Client found response content type of '', but expected 'text/xml'.
The request failed with an empty response.
VB Code:
Private Sub btnprint_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnprint.Click
        'RenderPDF()
        Dim rview As New Microsoft.Reporting.WebForms.ReportViewer()
        Dim apr As New AppSettingsReader()
        rview.ServerReport.ReportServerUrl = New Uri(apr.GetValue("ReportServer", GetType(String)))
        Dim paramList As New System.Collections.Generic.List(Of Microsoft.Reporting.WebForms.ReportParameter)()
        paramList.Add(New Microsoft.Reporting.WebForms.ReportParameter("@DateServed", RadDatePick.SelectedDate))
        paramList.Add(New Microsoft.Reporting.WebForms.ReportParameter("@Location", ddlSch.SelectedValue))
        paramList.Add(New Microsoft.Reporting.WebForms.ReportParameter("@MenuType", ddlmenutype.SelectedValue))
        rview.ServerReport.ReportPath = "/ReportFolder/ReportName"
        rview.ServerReport.SetParameters(paramList)
        Dim mimeType As String = Nothing
        Dim encoding As String = Nothing
        Dim extension As String = Nothing
        Dim deviceInfo As String = Nothing
        Dim streamIds As String() = Nothing
        Dim warnings As Microsoft.Reporting.WebForms.Warning() = Nothing
        Dim format As String = "PDF"
        deviceInfo = "<DeviceInfo>" + "<SimplePageHeaders>True</SimplePageHeaders>" + "</DeviceInfo>"
        Dim bytes As Byte() = rview.ServerReport.Render(format, deviceInfo, mimeType, encoding, extension, streamIds, warnings)
        Response.Clear()
        If format = "PDF" Then
            Response.ContentType = "application/pdf"
            Response.AddHeader("Content-disposition", "filename=output.pdf")
        End If
        Response.OutputStream.Write(bytes, 0, bytes.Length)
        Response.OutputStream.Flush()
        Response.OutputStream.Close()
        Response.Flush()
        Response.Close()
    End Sub
Posted 28-Mar-11 5:16am
Edited 28-Mar-11 5:21am
v2
Comments
Sandeep Mewara at 28-Mar-11 11:21am
   
Always format your code by PRE tags. They make the question readable.
Sandeep Mewara at 28-Mar-11 12:15pm
   
Sure it's not a timeout issue?
Rohit.Net100 at 28-Mar-11 13:46pm
   
no..its not.
Tarun.K.S at 29-Mar-11 3:35am
   
I suspect it might be because of unstructured XML.

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Check this

Service Account Requirements for Reporting Services in a SharePoint deployment

Restrictions on using built-in accounts apply to some deployment topologies of Reporting Services that include a report server running in SharePoint integrated mode. The following combination of factors will result in service account requirements:
* Report Server is integrated with a SharePoint farm comprising more than one computer.
* The report server and SharePoint Central Administration web site run on separate computers.

In this scenario, if the Report Server service runs under a built-in account such as NetworkService, the Grant database access option in SharePoint Central Administration will not work correctly. Consequently, accessing any Reporting Services feature through a SharePoint site will result in the following error:

"An unexpected error occurred while connecting to the report server. Verify that the report server is available and configured for SharePoint integrated mode. --> Server was unable to process request. --> Client found response content type of 'text/html; charset=utf-8', but expected 'text.xml'."

Choose either of the following approaches to avoid this error:

*On the computer that hosts the report server, continue to run the Report Server service as NetworkService and add the built-in account, such as NT_AUTHORITY\NetworkService to the WSS_WPG Windows group.

-- Or --

*Configure the service account to run under a domain user account as follows:
1.Start the Reporting Services Configuration tool and connect to the report server.
2.On the Service Account page, click Use another account, enter a domain user account, and click Apply.
3.Click Web Service Identity, for Report Server, click New, type an application Restart the Report Server service.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 213
1 Sergey Alexandrovich Kryukov 170
2 Inimicos 60
3 ProgramFOX 50
4 F-ES Sitecore 45
0 OriginalGriff 9,037
1 Sergey Alexandrovich Kryukov 8,417
2 CPallini 5,189
3 Maciej Los 4,726
4 Mika Wendelius 3,626


Advertise | Privacy | Mobile
Web03 | 2.8.150819.1 | Last Updated 4 Dec 2011
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100