Class

Report

Report

An object representing the internal report object. This object is an abstract description of how the final artifact should look like.

An instance of this class is accessible as a binding in report scripts.

Since:
  • 5.0

Extends

Members

addSlide

Add a new slide to report from template. Slides are added sequentially. Slides can be added in any order, as long as the referenced slide number exists in the template.

Example
var slide = report.addSlide(3);
// this will add 3rd slide from template to the report

setWorksheetConfiguration

Sets the name of a worksheet in an excel report by index.

Example
var config = {
  name: 'new worksheetname',
  color: [0, 155, 255],
  background: {
    text: 'backgroundtext',
    rotation: 25,
    margin: 50,
    font: {
      family: 'Arial',
      size: 30
    }
  }
};
report.setWorksheetName(1, config);

Methods

addProgressMessage(message)

Add a message to indicate progress of the report generation

Parameters:
Name Type Description
message string

message to add

Example
report.addProgressMessage('Processing project: My project');

put(key, value) → {ComponentContainer}

Parameters:
Name Type Description
key string

placeholder for a value in template

value string | number | date | Component

value for the key

Inherited From:

The container itself.

setFilename(filename)

Sets the name prefix of the generated report. The generated name will be in the following form: 'filename'(current date)(random id).'extension' A filename must not contain any spaces. An invalid filename will be replaced by 'report'

Parameters:
Name Type Description
filename

the filename

Since:
  • 5.6