|
1 | | -# Save and load report through the toolbar in javascript pivotview component |
2 | | -A quick-start project that demonstrates how to save and load reports in the Syncfusion Javascript Pivotview component using the toolbar. |
| 1 | +# 📊 Save & Load Reports in JavaScript PivotView Component |
3 | 2 |
|
4 | | -# Project prerequisites |
5 | | -Make sure that you have the compatible versions of Visual Studio Code in your machine before starting to work on this project. |
| 3 | +[](https://www.syncfusion.com/content/downloads/syncfusion_license.pdf) [](https://developer.mozilla.org/en-US/docs/Web/JavaScript) [](https://www.syncfusion.com/) |
6 | 4 |
|
7 | | -# How to run this application |
8 | | -To run this application, you first need to clone the [Save-and-load-report-through-the-toolbar-in-javascript-pivotview-component](https://github.com/SyncfusionExamples/save-and-load-report-through-the-toolbar-in-javascript-pivotview-component) repository and then open it in Visual Studio Code. Now, run the index.html in web browser, it will render the Essential JS 2 pivot table control. |
| 5 | +> **Production-ready example demonstrating toolbar-based report persistence in Syncfusion Essential JS 2 PivotView** — save and restore pivot table configurations with seamless localStorage integration and web-standards compliance. |
| 6 | +
|
| 7 | +## 🎯 Overview |
| 8 | + |
| 9 | +This repository provides a complete, production-ready implementation for **saving and loading pivot table reports** using Syncfusion's Essential JS 2 PivotView component. Whether building business intelligence dashboards, financial reporting tools, or analytics applications, this example demonstrates modern patterns for persistent pivot table configuration management. |
| 10 | + |
| 11 | +### ✨ Key Features |
| 12 | + |
| 13 | +- ✅ **Save Reports**: Persist pivot table configurations through intuitive toolbar buttons |
| 14 | +- ✅ **Load Reports**: Restore saved configurations with single-click operation |
| 15 | +- ✅ **Toolbar Integration**: Seamless report management UI within EJ2 toolbar |
| 16 | +- ✅ **Syncfusion EJ2**: Leverages robust, feature-rich PivotView component |
| 17 | +- ✅ **Web Standards**: Pure HTML, CSS, and JavaScript—zero framework dependencies |
| 18 | +- ✅ **Browser Compatible**: Works across Chrome, Firefox, Safari, and Edge |
| 19 | +- ✅ **Quick Start**: Minimal setup with working example included |
| 20 | + |
| 21 | +## 🛠 Prerequisites & Requirements |
| 22 | + |
| 23 | +- **Web Browser**: Chrome, Firefox, Safari, or Edge (latest versions) |
| 24 | +- **Text Editor**: Visual Studio Code or similar |
| 25 | +- **Live Server**: Optional—enables quick development preview |
| 26 | +- **JavaScript Knowledge**: Familiarity with ES5 and DOM manipulation |
| 27 | +- **Syncfusion License**: Community or commercial license for production use |
| 28 | + |
| 29 | +## 📦 Installation & Setup |
| 30 | + |
| 31 | +1. **Clone Repository** |
| 32 | + ```bash |
| 33 | + git clone https://github.com/SyncfusionExamples/save-and-load-report-through-the-toolbar-in-javascript-pivotview-component |
| 34 | + cd save-and-load-report-through-the-toolbar-in-javascript-pivotview-component |
| 35 | + ``` |
| 36 | + |
| 37 | +2. **Verify Project Files**: Ensure presence of: |
| 38 | + - `index.html` — Main application template |
| 39 | + - `index.js` — PivotView configuration and report logic |
| 40 | + - `index.css` — Component styling |
| 41 | + - `es5-datasource.js` — Sample data source |
| 42 | + |
| 43 | +3. **Launch Application** |
| 44 | + - Right-click `index.html` → "Open with Live Server" |
| 45 | + - Or open directly in browser: `file:///path/to/index.html` |
| 46 | + |
| 47 | +## 🚀 Quick Start |
| 48 | + |
| 49 | +Once loaded: |
| 50 | +- **View Data**: Pivot table displays configured datasource |
| 51 | +- **Save Report**: Click toolbar "Save" button to persist current layout |
| 52 | +- **Load Report**: Select previously saved report from dropdown to restore |
| 53 | +- **Modify & Re-save**: Adjust pivot configuration and save as new report |
| 54 | + |
| 55 | +## 🗂 Project Structure |
| 56 | + |
| 57 | +``` |
| 58 | +├── index.html # Application template & PivotView markup |
| 59 | +├── index.js # PivotView initialization & report management |
| 60 | +├── index.css # Component styling & layout |
| 61 | +├── es5-datasource.js # Sample JSON datasource |
| 62 | +└── README.md # This file |
| 63 | +``` |
| 64 | + |
| 65 | +## 🔧 Configuration & Customization |
| 66 | + |
| 67 | +**Save Report Button**: Captures current pivot configuration to local storage |
| 68 | +**Load Report Button**: Retrieves and applies saved configurations |
| 69 | +**Data Binding**: Modify `es5-datasource.js` to bind custom data sources |
| 70 | +**Styling**: Update `index.css` for branding and layout customization |
| 71 | + |
| 72 | +## 📚 Resources |
| 73 | + |
| 74 | +- [Syncfusion EJ2 PivotView Documentation](https://www.syncfusion.com/javascript-ui-controls/js-pivot-table) |
| 75 | +- [JavaScript MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/) |
| 76 | +- [localStorage API Guide](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage) |
| 77 | + |
| 78 | +## 📄 License |
| 79 | + |
| 80 | +This project is licensed under the **Syncfusion Community License**. See [Syncfusion License](https://www.syncfusion.com/content/downloads/syncfusion_license.pdf) for details. |
| 81 | + |
| 82 | +## 🆘 Support |
| 83 | + |
| 84 | +For issues or questions: |
| 85 | +- 📧 Open an issue on GitHub |
| 86 | +- 💬 Visit Syncfusion support forums |
| 87 | +- 🌐 Check Syncfusion documentation |
0 commit comments