Skip to content

Commit caa7e14

Browse files
committed
documentation(EJ2-67661): UG document to save and load report using database.
1 parent c51b80d commit caa7e14

23 files changed

Lines changed: 13 additions & 548 deletions

File tree

Javascript/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# How to bind MSSQL database to pivot table Save & Load Actions
1+
# How to save and load reports from a SQL Server Database to a Pivot Table
22

33
A quick start project that shows how to save and load reports from a SQL Server database and load them into the Syncfusion Pivot Table at run time. This repository includes a ASP.NET Core Web App Controller ([MyWebService](../MyWebService/)) for saving and loading reports from a SQL server database, as well as a quick start samples in the JavaScript platform that displays the loaded report in a Syncfusion Pivot Table.
44

@@ -15,4 +15,4 @@ Before beginning work on the server and client projects, ensure the following so
1515

1616
* To run this application, clone the [Save-and-load-report-from-SQL-database-to-pivot-table](https://github.com/SyncfusionExamples/Save-and-load-report-from-SQL-database-to-pivot-table) repository and then open **MyWebService** in Visual Studio 2022. Simply build and run your project in IIS Express, and it will host and display the URL 'https://localhost:44313'.
1717

18-
* Now open JavaScript sample in Visual Studio Code. Initialize the Pivot Table, map the hosted URL,create a pivot report, and finally, open the **index.html** file in your browser to run your project.
18+
* Now open the JavaScript sample in Visual Studio Code. Initialize the Pivot Table, create a pivot report based on the given data source, map the hosted url to perform save and load reports with the SQL database, and finally, open the **index.html** file in your browser to run your project.

Javascript/pivot-table/index.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -150,22 +150,18 @@ var pivotTableObj = new ej.pivotview.PivotView({
150150
pivotTableObj.appendTo("#PivotView");
151151

152152
function updateReport(reportList) {
153+
// Here you can refresh the report list by feeding updated reports fetched from the database.
153154
var reportListObj = pivotTableObj.element.querySelector(
154155
"#" + pivotTableObj.element.id + "_reportlist"
155156
).ej2_instances;
156157
if (reportListObj) {
157158
reportListObj[0].dataSource = reportList;
158159
reportListObj[0].value = pivotTableObj.toolbarModule.currentReport;
159-
if (
160-
pivotTableObj.toolbarModule.currentReport === "" &&
161-
reportListObj[0].itemData === null
162-
) {
163-
pivotTableObj.toolbarModule.currentReport =
164-
reportList[reportList.length - 1];
160+
// For remove report
161+
if (pivotTableObj.toolbarModule.currentReport === "" && reportListObj[0].itemData === null) {
162+
pivotTableObj.toolbarModule.currentReport = reportList[reportList.length - 1];
165163
reportListObj[0].value = pivotTableObj.toolbarModule.currentReport;
166-
pivotTableObj.loadReport({
167-
reportName: reportList[reportList.length - 1],
168-
});
164+
pivotTableObj.loadReport({ reportName: reportList[reportList.length - 1] });
169165
}
170166
}
171167
}

MyWebService/MyWebService.csproj.user

Lines changed: 0 additions & 11 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# Save and load report from SQL database to a Pivot Table
1+
# How to save and load reports from a SQL Server Database to a Pivot Table
22

33
A quick start project that shows how to save and load reports from a SQL Server database and load them into the Syncfusion Pivot Table at run time. This repository includes a ASP.NET Core Web App Controller ([MyWebService](./MyWebService/)) for saving and loading reports from a SQL server database, as well as a quick start samples in the [TypeScript](./Typescript/), [JavaScript](./Javascript/), [Angular](./Angular/), [React](./React/), [VUE](./VUE/), ASP.NET [Core](./Core/) and [MVC](./MVC/) platforms that displays the loaded report in a Syncfusion Pivot Table.

React/README.md

Lines changed: 0 additions & 29 deletions
This file was deleted.

React/pivot-table/.gitignore

Lines changed: 0 additions & 23 deletions
This file was deleted.

React/pivot-table/package.json

Lines changed: 0 additions & 39 deletions
This file was deleted.
-3.78 KB
Binary file not shown.

React/pivot-table/public/index.html

Lines changed: 0 additions & 43 deletions
This file was deleted.
-5.22 KB
Binary file not shown.

0 commit comments

Comments
 (0)