Skip to content

Commit 63b15f3

Browse files
committed
documentation(EJ2-67661): UG document to save and load report using database.
1 parent 2c72297 commit 63b15f3

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

Javascript/pivot-table/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ function updateReport(reportList) {
159159
reportListObj[0].dataSource = reportList;
160160
reportListObj[0].value = pivotTableObj.toolbarModule.currentReport;
161161
// For remove report
162-
if (pivotTableObj.toolbarModule.currentReport === "" && reportListObj[0].itemData === null) {
162+
if (pivotTableObj.toolbarModule.currentReport === "" && (reportListObj[0].itemData === null || reportList.length < 2)) {
163163
pivotTableObj.toolbarModule.currentReport = reportList[reportList.length - 1];
164164
reportListObj[0].value = pivotTableObj.toolbarModule.currentReport;
165165
pivotTableObj.loadReport({ reportName: reportList[reportList.length - 1] });

React/pivot-table/src/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default class App extends Component {
2727
reportListObj[0].dataSource = reportList;
2828
reportListObj[0].value = this.pivotObj.toolbarModule.currentReport;
2929
// For remove report
30-
if (this.pivotObj.toolbarModule.currentReport === "" && reportListObj[0].itemData === null) {
30+
if (this.pivotObj.toolbarModule.currentReport === "" && (reportListObj[0].itemData === null || reportList.length < 2)) {
3131
this.pivotObj.toolbarModule.currentReport = reportList[reportList.length - 1];
3232
reportListObj[0].value = this.pivotObj.toolbarModule.currentReport;
3333
this.loadReport({ reportName: reportList[reportList.length - 1] })

Typescript/pivot-table/src/app/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ function updateReport(reportList: any) {
117117
reportListObj[0].dataSource = reportList;
118118
reportListObj[0].value = (pivotTableObj.toolbarModule as any).currentReport;
119119
// For remove report
120-
if ((pivotTableObj.toolbarModule as any).currentReport === "" && reportListObj[0].itemData === null) {
120+
if ((pivotTableObj.toolbarModule as any).currentReport === "" && (reportListObj[0].itemData === null || reportList.length < 2)) {
121121
(pivotTableObj.toolbarModule as any).currentReport = reportList[reportList.length - 1];
122122
reportListObj[0].value = (pivotTableObj.toolbarModule as any).currentReport;
123123
pivotTableObj.loadReport({ reportName: reportList[reportList.length - 1] });

0 commit comments

Comments
 (0)