Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Scripting_function



Panel
titleDescription

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


Panel
titleClient Permission Restrictions

This scripting function has no Client Permission restrictions.


Panel
titleSyntax


Info

This function accepts keyword arguments.

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

  • Parameters

String path - The path to the existing report.

String project - The name of the project where the report is located. Optional in client scope.

PyDictionary parameters - A optional dictionary of parameter overrides, in the form name:value.

String fileType - The 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


Panel
titleValues for the fileType Parameter

Acceptable values are

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

New_in
Version7.9.5


As of 7.9.5, the XLS format may now be passed to the filtType fileType Parameter:

  • xls



Panel
titleCode Examples


Code Block
languagepy
titleCode 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")