Version
Version | Functional Change |
11.0 | No difference between V10.0 and V11.0 |
11.0.16 | Added the export API in the FineVis Data Visualization plugin of V2.0.0 and later versions. 1. The exportReportToExcel interface is supported in table components. 2. The exportTemplate interface is added, allowing you to export FVS templates as PDF, PPT, and image files. |
Public Module API
exportReportToExcel
Method | exportReportToExcel(extype) | Export a report in Excel format. |
Parameter | extype: string | Format (string) specified during export. page: in XLSX format during pagination export. simple: in XLSX format during unaltered export. sheet: in XLSX format during pagination and multi-sheet export. page_isExcel2003: in XLS format during pagination export. simple_isExcel2003: in XLS format during unaltered export. sheet_isExcel2003: in XLS format during pagination and multi-sheet export. Note: The sheet and sheet_isExcel2003 parameters are not supported in FVS table components. |
Return Value | void | |
Example | Example 1: If the obtained report block object is defined as report, the report is exported in Excel format during pagination and multi-sheet export.
Example 2: The general report is exported in Excel format during pagination and multi-sheet export.
Example 3: The Table1_Page1 component in the FVS template is exported in Excel format during pagination export.
Example 4: The report0 report block in the dashboard is exported in Excel format during pagination and multi-sheet export. _g().getWidgetByName('report0').exportReportToExcel('sheet'); | |
Application Example | Customize an Excel Export button, which you can click to export a report in Excel format. Click to download the template: Excel Export.cpt | |
Mobile Terminal | The interface is supported only in Pagination Preview and Data Entry Preview of the general report. |
General Report API
exportReportToImage
Method | exportReportToImage(extype) | Export a report as an image file. |
Parameter | extype: string | Format (string) specified during export. png: in PNG format. jpg: in JPG format. gif: in GIF format. |
Return Value | void | |
Example | Example 1: If the obtained report block object is defined as report, the report is exported as an image file in PNG format.
Example 2: The general report is exported as an image file in PNG format. report.exportReportToImage('png'); | |
Application Example | Customize an Image Export button, which you can click to export a report as an image file. Click to download the template: Image Export.cpt | |
Mobile Terminal | The interface is supported only in Pagination Preview and Data Entry Preview of the general report. |
exportReportToPDF
Method | exportReportToPDF() | Export a report in PDF format. |
Parameter | / | / |
Return Value | void | |
Example | Example 1: If the obtained report block object is defined as report, the report is exported in PDF format.
Example 2: The general report is exported in PDF format. _g().exportReportToPDF(); | |
Application Example | Customize a PDF Export button, which you can click to export a report in PDF format. Click to download the template: PDF Export.cpt | |
Mobile Terminal | The interface is supported only in Pagination Preview and Data Entry Preview of the general report. |
Method | exportReportToWord() | Export a report in Word format. |
Parameter | / | / |
Returned value | void | |
Example | Example 1: If the obtained report block object is defined as report, the report is exported in Word format.
Example 2: The general report is exported in Word format. _g().exportReportToWord(); | |
Application Example | Customize a Word Export button, which you can click to export a report in Word format. Click to download the template: Word Export.cpt | |
Mobile Terminal | The interface is supported only in Pagination Preview and Data Entry Preview of the general report. |
FineVis Visualization Dashboard API
exportTemplate
Method | exportTemplate({format,merge,delay}) | Export a FVS template. |
Parameter | formula: string | FVS templates can be exported as PDF, PPT, and image (default setting) files.
|
merge:boolean | Export multiple pages concatenated into a single file. true (default value): Export multiple pages concatenated into a single file. false: Export multiple pages separately into a single ZIP compressed file. | |
delay:number | Delay time (unit as second) | |
Returned value | void | |
Example | Example 1: Export a FVS template as the PDF file with multiple pages concatenated.
Example 2: Export a FVS template as the image file with multiple pages concatenated.
Example 3: Export a FVS template as the PPT file with multiple pages independent. duchamp.exportTemplate({format: "ppt",merge: false, delay: 5}) | |
Application Example | Customize an event, allowing you to export a template with multiple pages as the PDF file. Click to download the template: exportTemplate Interface.fvs | |
Mobile Terminal | Not supported |