library_report_get ()

library_report_get ()

Function prototype

library_report_get ( session, report )

API Version

All

Supported interfaces

SOAP, REST (Since API Version 2.7.32)

Description

Returns information about a REPORT TEMPLATE

Required permissions: The active user must have role PROGRAM EDITOR in the TEAM owner of the PROGRAM. Otherwise an INSUFFICIENT_PRIVILEGES error will be returned.

Input parameters:

  • session: is the session token obtained in the session_init() call

  • report: Reference of the REPORT TEMPLATE. Use the function library_program_task_get () to obtain the list of ACTIVITIES of a TASK TEMPLATE, which include both FORM TEMPLATES and REPORT TEMPLATES

Output parameters:

  • result: XML with the list of possible actions. Each action in the XML contains:

    • ref: Reference of the REPORT TEMPLATE

    • name: Name (title) of the REPORT TEMPLATE in the active session language

    • description: Description of the REPORT TEMPLATE in the active session language

    • report_code: Code assigned to the REPORT. It can be used in some FORM FORMULAS or OBJECT CODES instead of the internal reference

    • version: Version of the REPORT TEMPLATE. This value is null if it is a new REPORT that is part of a PROGRAM that has never been published

    • orientation: Orientation of the pages. Possible values:

      • “PORTRAIT”

      • “LANDSCAPE”

    • owner: indicates who is the owner of the FORM TEMPLATE. Possible values:

      • PROGRAM: The REPORT TEMPLATE belongs to the PROGRAM where it was created. This is the default value

      • TEAM/n: The REPORT TEMPLATE belongs to the TEAM referenced by "n" (it can be a TEAM reference or a TEAM CODE)

      • SYSTEM: The REPORT TEMPLATE belongs to the SYSTEM (normally reserved for internal REPORT TEMPLATES)

    • access: (PUBLIC/PRIVATE)

    • hidden: Defines the visibility of the REPORT generated from this REPORT TEMPLATE. Introduced in API Version 2.7.32
      Possible values:

      • 0: Never hidden (always visible)

      • 1: The always hidden (never visible)

      • 2: The report is visible only while the TASK that contains the REPORT is open, but hidden when the TASK is closed

      • 3: The report is hidden only while the TASK that contains the REPORT is open, but visible when the TASK is closed

    • modified: Information about the last modification of the REPORT TEMPLATE

      • date: Date of the last modification

  • ErrorMsg: If any error occurs, then this value contains a description of the error translated to the current language

  • ErrorCode: If any error occurs, then this value contains any of the standard ERROR CODES

Request example

library_report_get ( “LCAAAAAAAAAAAA”, "WORKPLAN/16081/REPORT/283/400|16081")

Response

The response format is XML when the function has been invoked via the SOAP API, and JSON when it has been invoked via the REST API

Return Error codes

ERROR CODE

 

ERROR CODE

 

INVALID_TOKEN

The session token provided is not valid

INSUFFICIENT_PRIVILEGES

The session user does not have the necessary privileges to request information about the REPORT TEMPLATE

WORKPLAN.NOT_FOUND

The WORKPLAN to which this FORM TEMPLATE belongs was not found

REPORT.NOT_FOUND

The requested REPORT TEMPLATE was not found