We help IT Professionals succeed at work.

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

Term56
Term56 asked
on
Medium Priority
902 Views
Last Modified: 2010-05-18
This is the code being executed

       Dim strtest As New ReportDocument
        CrystalReportViewer1.DisplayGroupTree = False
        'strtest.Load("\\fmsaturn\rpt_manager\job_Profitability_Report_Summary_(v3.2.8.5).rpt")
        strtest.Load("C:\Inetpub\wwwroot\crystal_deploy\job_Profitability_Report_Summary_(v3.2.8.5).rpt")
        If strClientCode <> "" Then
            strtest.SetParameterValue("@ClientCode", strClientCode)
        Else
            strtest.SetParameterValue("@ClientCode", " ")
        End If
        strtest.SetParameterValue("@ViewType", strOCA)
        strtest.SetParameterValue("@OpenClosedAll", strVT)
        If strCreateDate <> "" Then
            strtest.SetParameterValue("@jobcreateend", strCreateDate)
        Else
            strtest.SetParameterValue("@jobcreateend", " ")
        End If
        If strJobNumber <> "" Then
            strtest.SetParameterValue("@jobnumbers", strJobNumber)
        Else
            strtest.SetParameterValue("@jobnumbers", " ")
        End If
        If strEndDate <> "" Then
            strtest.SetParameterValue("@jobcreatestart", strEndDate)
        Else
            strtest.SetParameterValue("@jobcreatestart", " ")
        End If
        CrystalReportViewer1.ReportSource = Nothing
        CrystalReportViewer1.ReportSource = strtest
        CrystalReportViewer1.Visible = True
        CrystalReportViewer1.RefreshReport()

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
 
Comment
Watch Question

Senior Consultant
CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2013
Commented:
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.

mlmcc

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Commented:
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.ApplyLogOnInfo(crTableLogOnInfo)
                crTable.Location = crTableLogOnInfo.TableName
            Next

dylan

Author

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.



Mike McCrackenSenior Consultant
CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2013

Commented:
Glad i could help

mlmcc
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.