• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 850
  • Last Modified:

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

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
  • 2
1 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.

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

Term56Author Commented:
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.

Glad i could help


Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now