Namespace LABKEY.Report
Report static class that allows programmatic manipulation of reports and their underlying engines.
Defined in: Report.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Method Attributes | Method Name and Description |
---|---|
<static> |
LABKEY.Report.createSession(config)
Creates a new report session which can be used across multiple report requests.
|
<static> |
LABKEY.Report.deleteSession(config)
Deletes an underlying report session
|
<static> |
LABKEY.Report.execute(config)
Executes a report script
|
<static> |
LABKEY.Report.executeFunction(config)
Executes a single method avaiable in the namespace of a previously created session context.
|
<inner> |
getExecuteSuccessCallbackWrapper(config, scope)
Private function to decode json output parameters into objects
|
<static> |
LABKEY.Report.getSessions(config)
Returns a list of report sessions created via createSession
|
Method Detail
<static>
LABKEY.Report.createSession(config)
Creates a new report session which can be used across multiple report requests. For example,
this allows an R script to setup an R environment and then use this environment in
subsequent R scripts.
- Parameters:
- {Object} config
- A configuration object with the following properties.
- {Object} config.clientContext
- Client supplied identifier returned in a call to getSessions()
- {Function} config.success
- The function to call with the resulting information.
This function will be passed a single parameter of type object, which will have the following
properties:
- reportSessionId: A unique identifier that represents the new underlying report session, a String
- {Function} config.failure Optional
- A function to call if an error occurs. This function
will receive one parameter of type object with the following properties:
- exception: The exception message.
- {String} config.containerPath Optional
- The container in which to make the request (defaults to current container)
- {Object} config.scope Optional
- The scope to use when calling the callbacks (defaults to this).
<static>
LABKEY.Report.deleteSession(config)
Deletes an underlying report session
- Parameters:
- {Object} config
- A configuration object with the following properties.
- {String} config.reportSessionId
- Identifier for the report session to delete.
- {Function} config.success
- The function to call if the operation is successful.
- {Function} config.failure Optional
- A function to call if an error occurs. This function
will receive one parameter of type object with the following properties:
- exception: The exception message.
- {String} config.containerPath Optional
- The container in which to make the request (defaults to current container)
- {Object} config.scope Optional
- The scope to use when calling the callbacks (defaults to this).
<static>
LABKEY.Report.execute(config)
Executes a report script
- Parameters:
- {Object} config
- A configuration object with the following properties.
- {String} config.containerPath Optional
- The container in which to make the request (defaults to current container)
- {Object} config.scope Optional
- The scope to use when calling the callbacks (defaults to this).
- {String} config.reportId
- Identifier for the report to execute
- {String} config.reportName Optional
- name of the report to execute if the id is unknown
- {String} config.schemaName Optional
- schema to which this report belongs (only used if reportName is used)
- {String} config.queryName Optional
- query to which this report belongs (only used if reportName is used)
- {String} config.reportSessionId Optional
- Execute within the existsing report session.
- {String} config.inputParams Optional
- An object with properties for input parameters.
- {Function} config.success
- The function to call if the operation is successful. This function will
receive an object with the following properties
- console: a string[] of information written by the script to the console
- error: any exception thrown by the script that halted execution
- ouputParams: an outputParam[] of any output parameters (imgout, jsonout, etc) returned by the script
- {Function} config.failure Optional
- A function to call if an error preventing script execution occurs.
This function will receive one parameter of type object with the following properties:
- exception: The exception message.
<static>
LABKEY.Report.executeFunction(config)
Executes a single method avaiable in the namespace of a previously created session context.
- Parameters:
- {Object} config
- A configuration object with the following properties.
- {String} config.containerPath Optional
- The container in which to make the request (defaults to current container)
- {Object} config.scope Optional
- The scope to use when calling the callbacks (defaults to this).
- {String} config.functionName Optional
- The name of the function to execute
- {String} config.reportSessionId Optional
- Execute within the existsing report session.
- {String} config.inputParams Optional
- An object with properties for input parameters.
- {Function} config.success
- The function to call if the operation is successful. This function will
receive an object with the following properties
- console: a string[] of information written by the script to the console
- error: any exception thrown by the script that halted execution
- ouputParams: an outputParam[] of any output parameters (imgout, jsonout, etc) returned by the script
- {Function} config.failure Optional
- A function to call if an error preventing script execution occurs.
This function will receive one parameter of type object with the following properties:
- exception: The exception message.
<inner>
{Mixed}
getExecuteSuccessCallbackWrapper(config, scope)
Private function to decode json output parameters into objects
- Parameters:
- config
- scope
- Returns:
- {Mixed}
<static>
LABKEY.Report.getSessions(config)
Returns a list of report sessions created via createSession
- Parameters:
- {Object} config
- A configuration object with the following properties.
- {Function} config.success
- The function to call if the operation is successful. This function will
receive an object with the following properties
- reportSessions: a reportSession[] of any sessions that have been created by the client
- {Function} config.failure Optional
- A function to call if an error occurs. This function
will receive one parameter of type object with the following properties:
- exception: The exception message.
- {String} config.containerPath Optional
- The container in which to make the request (defaults to current container)
- {Object} config.scope Optional
- The scope to use when calling the callbacks (defaults to this).