[]
        
(Showing Draft Content)

Print Report

To print the ReportSheet, you can use the print method of the GC.Spread.Sheets.Workbook class in SpreadJS.

Note: To use the print feature, it is necessary to add the following script file:

<script src="scripts/gc.spread.sheets.print.x.x.x.min.js"></script>

You can print a report with varied effects by changing the pagination properties in the TemplateSheet. Refer to Set Pagination for more information on pagination settings.

ReportSheet enables printing in all render modes of a report. However, the PaginatedPreview render mode is recommended for better printing support.

By default, all pages will be printed in the PaginatedPreview render mode. Each page in this mode will be printed on a single sheet of paper, scaled if necessary, and will not be re-paginated.

If you want to print the current page only, set the printAllPages option in the ReportSheet class to false. However, if it is set to true, all pages will be printed.

The following sample code shows how to print only the current page.

// Print the current page.
reportSheet.options.printAllPages = false; 
// Execute print.
spread.print();

The following image depicts the print preview of a row pagination report, where each page contains 60 records.

image