Skip to main content
Version: 7.9

system.report.executeReport

This function is used in Python Scripting.

Description

Immediately executes an existing report and returns a byte[] of the output.

Client Permission Restrictions

This scripting function has no Client Permission restrictions.

Syntax

note

This function accepts keyword arguments.

system.report.executeReport(path, project, [parameters], fileType)

Parameters

TypeParameterDescription
StringpathThe path to the existing report.
StringprojectThe name of the project where the report is located. Optional in Client scope.
PyDictionaryparametersA optional dictionary of parameter overrides, in the form name:value.
StringfileTypeThe file type the resulting byte array should represent. Defaults to "pdf". Not case-sensitive.

Returns

byte[] - A byte array of the resulting report.

Throws

IllegalArgumentException - Thrown when any of the following occurs: If the file type is not recognized, path does not exist, project does not exist.

Scope

All

Values for the fileType Parameter

Acceptable values are:

  • pdf
  • html
  • csv
  • rtf
  • jpeg
  • png
  • xml

Code Examples

Code Snippet
# Executes the report, overriding two parameters
overrides = {"myStringParam":"Hello world", "myIntParam":3}
bytesArray = system.report.executeReport(path="My Path", project="MyProject", parameters=overrides, fileType="pdf")