Web pages do not preserve state (the status and information of a user connecting to a website). Each Web page is requested from a server, sent to the user, and the process is then terminated. This is fine when reading text information, but problematic when designing a Web application that needs to preserve information about a user across page reloads and redirects.
Persistence refers to the use of a mechanism to preserve state for each user (such as the current report page being viewed by each user) unhindered by page reloads and redirects.
In this section, you explore best practices for persisting changes made to a Crystal report on a Web page while that report is refreshed during a Web page reload. The change that needs to be persisted may be as simple as going to the second page after the report viewer's Next Page button has been clicked, or as complex as displaying entirely different data after a report's parameters have been changed.
In Crystal Reports for Visual Studio .NET, persistence must be applied to the following components:
|
|
|
For more information on persistence, refer to State Management Recommendations on MSDN. |
In traditional ASP and ASP.NET, the state is maintained by either the Web browser or the Web server, in the following ways:
|
Environment |
Client or server? |
Name |
Method |
|
ASP* |
Client browser |
Form fields |
Pass name/value pairs across Web pages through form submission fields. |
|
ASP* |
Client browser |
URL arguments |
Pass name/value pairs across Web pages using URL arguments. |
|
ASP* |
Client browser |
Cookie |
Assign name/value pairs to a cookie on the client browser, and then retrieve the cookie in a new page. |
|
ASP* |
Web server |
Session object |
Assign instantiated objects to the Session object on the server, and then retrieve from Session in a new page. |
|
ASP* |
Web server |
Application object |
Assign instantiated objects to the Application object on the server, and then retrieve from Application in a new page. |
|
ASP.NET |
Client browser |
ViewState object |
Assign string values to the ViewState object of the ASP.NET Web Form. |
|
ASP.NET |
Web server |
Cache object |
Same as Application object, but with enhanced features. |
* All ASP persistence approaches continue to work in ASP.NET.
The most appropriate persistence approaches to use with RAS are ViewState and Session. The approach you choose to use depends on the object model.
© 2021 SAP AG. All rights reserved.
http://www.sap.com/sapbusinessobjects/
Support services
http://service.sap.com/bosap-support/
Created with the Personal Edition of HelpNDoc: Free Qt Help documentation generator