1841466 - While viewing Crystal report in a Web viewer, when navigated to the second page, report prompts for database credentials.

SAP Knowledge Base Article - Public

1841466 - While viewing Crystal report in a Web viewer, when navigated to the second page, report prompts for database credentials.

Symptom

  • While running the Microsoft Visual Studio 2008 Application, the first page of the Crystal Report can be seen properly.
  • However, when navigated to the second page, it asks for the database credentials.

Environment

  • Microsoft Visual Studio 2008
  • Crystal Reports 2008

 

Cause

  • Page navigation causes a PostBack.
  • With every PostBack that is, request to a server for a page, a new instance of the Web page class is created, since web applications are stateless

  • Due to this all the information retained by page is lost.

 

 

Resolution

  1. In order to preserve state for each user irrespective of page navigation, sessions can be used.
  2. It is a best way of persisting the ReportClientDocument or the ReportDocument object model, if the report has been encapsulated within either of them.
  3. Put the Report object or the ReportDocumentObject in a session variable.

 

See Also

  • For more information on session, see the following articles:
  1. Persisting Crystal Reports .NET web applications - I
  2. Persisting Crystal Reports .NET web applications - II
  3. Why should I store Report's object in HttpSession?

 

Keywords

Database Logon prompt, Visual Studio 2008, Crystal Reports 2008 , KBA , BI-DEV-NET , BI Software Development Kits (SDKs) - .NET or Other , Problem

Product

Crystal Reports 2008 V1