cr9 error : System.Exception: Fail to get the specific page.

Posted on 2006-03-29
Last Modified: 2010-05-18
This is the code being executed

       Dim strtest As New ReportDocument
        CrystalReportViewer1.DisplayGroupTree = False
        If strClientCode <> "" Then
            strtest.SetParameterValue("@ClientCode", strClientCode)
            strtest.SetParameterValue("@ClientCode", " ")
        End If
        strtest.SetParameterValue("@ViewType", strOCA)
        strtest.SetParameterValue("@OpenClosedAll", strVT)
        If strCreateDate <> "" Then
            strtest.SetParameterValue("@jobcreateend", strCreateDate)
            strtest.SetParameterValue("@jobcreateend", " ")
        End If
        If strJobNumber <> "" Then
            strtest.SetParameterValue("@jobnumbers", strJobNumber)
            strtest.SetParameterValue("@jobnumbers", " ")
        End If
        If strEndDate <> "" Then
            strtest.SetParameterValue("@jobcreatestart", strEndDate)
            strtest.SetParameterValue("@jobcreatestart", " ")
        End If
        CrystalReportViewer1.ReportSource = Nothing
        CrystalReportViewer1.ReportSource = strtest
        CrystalReportViewer1.Visible = True

when it starts processing, get this error from time to time. It used to work fine. Also, I upgraded CR 8.5 to 9.0, and started using the updated cr for .net dll's.

the report sometimes shows up fine, but in the VS IDE, the object for the reportviewer says :

Error creating control, Failed to create designed 'CrystalDecisions.VSDesigner.WebReportViewerDesigner, CrystalDecisions.VSDesigner, Version 9.2.3300.0, Culture=neutral, PublicKey = (stuff)'

this is what I get from time to time :

Fail to get the specific page.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Exception: Fail to get the specific page.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace:

[Exception: Fail to get the specific page.]
   CrystalDecisions.Web.ReportAgent.{(Boolean C) +522
   CrystalDecisions.Web.CrystalReportViewer.OnPreRender(EventArgs e) +133
   System.Web.UI.Control.PreRenderRecursiveInternal() +77
   System.Web.UI.Control.PreRenderRecursiveInternal() +161
   System.Web.UI.Control.PreRenderRecursiveInternal() +161
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint
Question by:Term56
    LVL 100

    Accepted Solution

    DO you have CR9 standalone or are you using the version that came with Visual Studio?

    If you have CR9 standalone then you don't want to use the .Net dlls since they are for CR.Net which comes with Visual Studio.

    LVL 8

    Expert Comment

    I have 2 question here:

    1) did you uncheck the "file->save data with report" from your CR Designer?
    2) I didn't see you do any database connection setting from your code, are you calling your report using push method (get dataset from database and bind to report). If no, I think you should add the code below:

                'Setup the connection information.
                crConnectionInfo = New ConnectionInfo
                With crConnectionInfo
                    .ServerName = "jamesdell"
                    .DatabaseName = "001"
                    .UserID = "sa"
                    .Password = ""
                End With

                'Get the table information from the report
                crDatabase = crReportDocument.Database
                crTables = crDatabase.Tables

                'Loop thru all tables in the report and apply the connection information for each table.
                For Each crTable In crTables
                    crTableLogOnInfo = crTable.LogOnInfo
                    crTableLogOnInfo.ConnectionInfo = crConnectionInfo
                    crTable.Location = crTableLogOnInfo.TableName


    Author Comment

    I have 9 enterprise, but when I installed 9 enterprise it also installed an updated sdk for .net. So I'm using the sdk for .net that came with enterprise 9.

    I commented out the part that has the connection info, but I am setting each table to a username/password. this started to happen when I added a few more listboxes, that feed the parameters, but the parameters are passed fine.

    basically I created a webform which has a crviewer, which passes parameters to CR to run the report dynamically.

    LVL 100

    Expert Comment

    Glad i could help


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
    Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now