Report class
The Report class allows you to print a file with a map, tables, and supporting elements.
AMD Module Require
require(["jimu/dijit/Report"], function(Report) { /* code goes here */ });
Constructor
new Report(params) Creates a new Report dijit. Parameters: <String> printTaskUrl—Required. URL of the print task. <String> reportLogo—Optional. URL of the logo image. The report logo placeholder is hidden unless a value is provided. <Object> reportLayout—Optional. Contains details for page size and orientation. The default is as follows:
<Number> tableCols—Optional. Can be used to define a set number of table columns for the report. It is overridden by tableCols specified for individual print data objects. The default is 3. <Boolean> alignNumbersToRight—Optional. Supports RTL and LTR. The default is false. <Array> styleSheets—Optional. Collection of style sheets to override default report styling. Default values are defined in the provided HTML template at jimu/dijit/templates/ReportTemplate.html. <String> styleText—Optional. CSS style text to be applied to the report header. <String> footNotes—Optional. Values to add to the report footer. Example 1: Use the ArcGIS Online print task within the report to generate a printer-ready version of the map.
Example 2: Use a custom print task within the report to generate a printer-ready version of the map based on the defined ArcGIS PrintTemplate.
|
Methods
print (reportTitle, printData) Prints the provided data to an HTML page. The default HTML template is provided at jimu/dijit/templates/ReportTemplate.html. Parameters: <reportTitle> String—Optional. The value to be displayed as the report title. <printData> Array—Required. Array of data objects that will be printed to the map. Supported types are map, table, and html. |
Data objects
MAP A map object provides a way for you print an ArcGIS JavaScript map object in the report. When using a custom print service, provide an ArcGIS PrintTemplate to the MAP object to define the appropriate layout options to be used in the report.
TABLE A table object provides a way for you print rows and columns of data in the report.
HTML An HTML object provides a way for you to add HTML elements to the report.
NOTE A note object provides an editable text area that can be updated dynamically by the user in the report preview window prior to printing.
|
The following is the list of CSS class selectors that can be overridden to control aspects of report styling.
Note:
Defaults are provided with the HTML template at jimu/dijit/templates/ReportTemplate.html.
.esriCTSectionTitle
.esriCTReportMapImg
.esriCTTable
.esriCTTable th
.esriCTTable td
.esriCTDateContainer
.esriCTAOIInfoDiv
.esriAOITitle
.esriCTAOIArea
.esriCTHTMLData
.esriCTReportLogo
.esriCTPrintTitleDiv
.esriCTReportMain
.esriCTReportMap
.esriCTReportFooter
.esriCTReportHeader
In this topic
We'd love to hear your feedback
Thank you for helping us make ArcGIS Developers even better!