Report Viewer 9 problems

Discussion in 'Databases' started by bbauer, Feb 16, 2010.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I had report viewer 8 working okay, I was able to connect and view remote reports on the DASP SSRS2005 server using an IReportServerCredential class stored in my app_code folder to pss credentials. However now that I have attempted to upgrade to Report Viewer 9 I am having trouble.

    First off I have taken all reference to Report Viewer 8 out of my web config and replaced with:

    <add assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
    <add assembly="Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />

    I have added Webforms, Common and ProcessingObjectModel dlls to the bin folder in my project. For some reason I cannot add ProcessingObjectModel to the references via property pages.

    I have not changed the IReportServerCredentials class or appSettings in my webconfig (Administrator, Password, ServerName)

    I am getting a declaration expected error in my code behind file with a squiggly line under 'rptview' which is the name of the reportviewer I added to the page:

    Imports Microsoft.Reporting.WebForms
    Imports Microsoft.ReportingServices.ReportProcessing
    Imports Microsoft.ReportingServices

    Partial Class admin_invoices_reportInvReg
    Inherits System.Web.UI.Page

    rptview.ServerReport.ReportServerCredentials = New ReportServerCredentials()
    rptview.ShowParameterPrompts = False

    Dim qstring1 As String = Request.QueryString("id")
    Dim qstring2 As String = Request.QueryString("type")
    Dim p1 As New ReportParameter("ID", qstring1)
    Dim p2 As New ReportParameter("TYPE", qstring2)
    Dim p() As ReportParameter = {p1, p2}
    rptview.ServerReport.SetParameters(p)

    End Class

    Any ideas what I am doing wrong here? I am a complete trial by error programmer.
     
  2. I am missing a subroutine, that is what I am missing. Is there a way to delete boneheaded posts?
     
  3. Bruce

    Bruce DiscountASP.NET Staff

    i don't think you can delete the post but you can edit it.
     
  4. mjp

    mjp

    Regular users can only edit for 30 minutes.

    The reason we don't want to remove any posts once the issue is resolved is because our mistakes (and solutions) can be helpful to others coming here for help.
     
  5. Well I've got the basics in the code now. -but still having problems with Report Viewer 9. Missing icons, java script erros and no rendering when using calendar parameters... Report Viewer 8 worked like a charm, starting to feel disgrunteld about my upgrade to VS2008.
     
  6. Finally got things working. I was getting the report viewer toolbar, but after entering parameters and clicking View Report, the report would not render. I altered the code behind with a page_init sub rather than a page_load with the condition to check for a postback:

    Protected Sub Page_Init(ByVal sender As Object, _
    ByVal e As System.EventArgs) Handles Me.Init

    If Not Page.IsPostBack Then
    ReportViewer1.ServerReport.ReportServerCredentials = New ReportServerCredentials()
    ReportViewer1.ShowParameterPrompts = True
    End If

    End Sub

    Finally I am enjoying my reports...
     
  7. mjp

    mjp

    That's good news. Thanks for posting a follow-up.
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page