none
Reportviewer doesnt display on page‏.. Page loads endlessly RRS feed

  • Question

  • Hi all, I am having a problem with a report.

    when i load the page, the page keeps loading endlessly.

    my server uses iis v6.0 but when i run the same on my local machine with iis v7.0 the reprt displays.

    other reports on the same server with iis v6.0 display except thisone.

    please find below the codes

    Webconfig

    <httpHandlers>
    <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
        validate="false" />
      </httpHandlers>

    .aspx

    <%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
        Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
    
    <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
              
                    <asp:Label ID="lblMessage" runat="server" CssClass="lblStatus"></asp:Label>
                      
        <rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" 
            Font-Size="8pt" Height="400px" Width="892px" Visible="False">
            <LocalReport ReportPath="Report.rdlc">
                <DataSources>
                    <rsweb:ReportDataSource DataSourceId="ObjectDataSource2" 
                        Name="CertDs_IPA_cert_insert" />
                </DataSources>
            </LocalReport>
        </rsweb:ReportViewer>
        <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" 
            SelectMethod="GetData" 
            TypeName="CertDsTableAdapters.IPA_cert_insertTableAdapter">
        </asp:ObjectDataSource>
    
    </asp:Content>
    

    .aspx.vb

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    
            If Not IsPostBack Then
    
                ReportViewer1.Visible = True
    
                Dim thisDataSet As New DataSet
                Dim params() As SqlParameter = {New SqlParameter("@ClientID", Request.QueryString("ClientID"))}
    
                Dim myReader As SqlDataReader = Nothing
                myReader = SqlHelper.ExecuteReader(Connstring, CommandType.StoredProcedure, "IPA_cert_insert", params)
                If myReader.HasRows Then
                    myReader.Read()
                    srsPath = myReader.GetString(20)
                End If
    
                thisDataSet = SqlHelper.ExecuteDataset(Connstring, CommandType.StoredProcedure, "report_display", params)
                Dim ds As ReportDataSource = New ReportDataSource("rptDs_report_display", thisDataSet.Tables(0))
    
                ReportViewer1.LocalReport.DataSources.Clear()
                ReportViewer1.LocalReport.DataSources.Add(ds)
                ReportViewer1.LocalReport.EnableExternalImages = True
    
    
                Dim rptParam2 As New ReportParameter("Path", "http://" + Request.Url.Host + "/" + ResolveUrl(srsPath))
                ReportViewer1.LocalReport.SetParameters(New ReportParameter() {rptParam2})
    
                If thisDataSet.Tables(0).Rows.Count = 0 Then
    
                    lblMessage.Text = "Sorry, no report"
                    ReportViewer1.Visible = False
                Else
                    lblMessage.Text = ""
                End If
    
                ReportViewer1.LocalReport.Refresh()
            End If
        End Sub

    Tuesday, September 25, 2012 10:39 AM