Overview
Version
| Report Server Version | Functional Change |
|---|---|
| 11.0 | / |
Application Scenario
When multiple sheets exist in a report, the first sheet is displayed by default during the frontend preview.
However, you may want to display the second sheet by default after selecting Data Entry Preview, as shown in the following figure.

Implementation Method
You can add a Loading Start event under Web Attribute > Data Entry Setting to specify the sheet to be displayed initially.
For details about the API description, see Exclusive API for Data Entry Preview.
Example
Template Preparation
Prepare a report with three sheets and download the prepared template Demographic Statistics Table.cpt.
Event Adding
Choose Template > Web Attribute > Data Entry Setting on the menu bar, select Set for This Template Separately, and add a Loading Start event, as shown in the following figure.

The JavaScript code is as follows.
if (typeof(tempfirstLoad) == "undefined") {
_g().loadSheetByIndex(1);
//Switch to the second sheet.
tempfirstLoad = false;
//To prevent the repeated execution of the event, set the global variable to false.
}
Effect Display
Note:Save the report and click Data Entry Preview. The effect is the same as that shown in section "Application Scenario."
Template Download
For details, you can download the template Displaying the Specified Sheet Tab Page by Default After Page Loading by JS.cpt.