RMP_Report

Report widget

new RMP_Report()

Members

<static, constant> RMP_AppliReport :Object

Available column names for Application Report
Properties:
Name Type Default Description
NAME Object name Name of the application
PUBLISHED Object published Publication date
STATE Object state State of the application
AGE Object age Age of the application
ONHOLD Object onhold Duration of the holding time
OWNER Object owner Owner of the application
CONTRIBUTOR Object contributor Contributor of the application

<static, constant> RMP_FilterOperator :string

Available operators for filter
Properties:
Name Type Default Description
EQUAL string EE Equal
NOT_EQUAL string NE Not equal
LESS_THAN string LT Less than
GREATER_THAN string GT Greater than
LESS_THAN_EQUAL string LTE Less than or equal
GREATER_THAN_EQUAL string GTE Greater than or equal
BETWEEN string BETWEEN Between
CONTAINS string CONTAINS Contains
IN string IN In
NOT_IN string NOT_IN Not in

<static, constant> RMP_ProcessReport :string

Available column names for Process Report
Properties:
Name Type Default Description
NAME string name Name of the process
DURATION string duration Duration of the process
DELAY string delay Delay of the process
YEAR string year Year of the process
MONTH string month Month of the process
DAY string day Day of the process
ID string id Id of the process
PARENT string parent Parent of the process
PUBLISHED string published Publication date of the process
UPDATED string updated Last update date of the process
STATUS string status Status of the process
EVENTS string events Events of the process
OWNER string owner Owner of the process
CONTRIBUTOR string contributor Contributor of the process

Methods

addCssRule(cssRule)

allows you to add a given css to your web interface
Parameters:
Name Type Description
cssRule String
Example
   id_report.addCssRule(".Button{text-indent:20px;}"))
 

addFilter(columnName, operatorString, primaryValue, secondaryValue)

Add one filter to the column
Parameters:
Name Type Description
columnName RMP_Report.RMP_AppliReport | RMP_Report.RMP_ProcessReport Column's name
operatorString RMP_Report.RMP_FilterOperator Operator of the filter
primaryValue String Value of the filter
secondaryValue String Second value (optional) of the filter
See:
Throws:
RunTimeException if the columnName is unknown

addMeasureFilter(labelName, operatorString, primaryValue, secondaryValue)

Add one filter to the measure column
Parameters:
Name Type Description
labelName String Column's label
operatorString RMP_Report.RMP_FilterOperator Operator of the filter
primaryValue String Value of the filter
secondaryValue String Second value (optional) of the filter
See:
Throws:
RunTimeException if the labelName is unknown

addRowStyle(rowId, className)

Sets an additional css class name to the given row
Parameters:
Name Type Description
rowId String the name of the column to affect
className String the class to set for the given row

clearFilter(columnName)

Clear all filters of the column
Parameters:
Name Type Description
columnName RMP_Report.RMP_AppliReport | RMP_Report.RMP_ProcessReport Column's name
Throws:
RunTimeException if the columnName is unknown

clearMeasureFilter(columnLabel)

Clear all filters of the column
Parameters:
Name Type Description
columnLabel String Column's label
Throws:
RunTimeException if the columnLabel is unknown

getAggregate() → {String}

Return the aggregation pipelines of the report
Returns:
Aggregation pipelines of the report (json array)
Type
String

getAllValues() → {Array}

Gets all the values of the set of rows
Returns:
the JSONArray of JSONObjects representing the values [{column : value, ...}, ...]
Type
Array

getColumnHeader(columnName) → {String}

Get the header of a report column
Parameters:
Name Type Description
columnName String the name of the report column
Returns:
Type
String

getColumnHeaderByIndex(columnIndex) → {String}

Get the header of a report column
Parameters:
Name Type Description
columnIndex String the index of the report column
Returns:
Type
String

getContainerIndex() → {String}

Returns:
the index of the container of the widget, it might be the index of the column if the widget is in an array or the index of the tab if it's in a tab panel
Type
String

getCurrentRange() → {Array}

Gets the current range of rows displayed by the widget
Returns:
the JSONArray representing this range : [firstItem, lastItem]
Type
Array

getElement() → {object}

This function returns the html object of the widget
Returns:
Type
object

getFilters(encoded) → {object}

Get an array that contains the applied filters
Parameters:
Name Type Description
encoded boolean returns the encoded filter values if true or raw values otherwise
Returns:
Type
object

getLatestSelectedLineValues() → {object}

Get the latest selected row of the report
Returns:
return the latest selected row or null if the latest user action has deselected a row
Type
object

getName() → {String}

This function returns the id as string of the widget
Returns:
Type
String

getParent() → {object}

Returns:
the parent widget of a widget
Type
object

getQuery() → {String}

Return the query of the report
Returns:
Query of the report
Type
String
Get the url used to load the report
Returns:
Type
String

getRowAllValues(rowId) → {Array}

Gets all the values of the given row
Parameters:
Name Type Description
rowId String row's id
Returns:
the JSONObject representing the values {column : value, ...}
Type
Array

getRowCount() → {String}

Gets the current row count, using filters
Returns:
the number of rows.
Type
String

getRowsId() → {Array}

Gets the ids of all rows
Returns:
the JSONArray representing all the values
Type
Array

getRowValue(rowId, column) → {String}

Gets the value of the given row, for the given column
Parameters:
Name Type Description
rowId String row's index
column RMP_Report.RMP_AppliReport | RMP_Report.RMP_ProcessReport the concerned column name
See:
Returns:
string value
Type
String

getSelectedLinesValues() → {Array}

Gets all the values of the set of selected rows Formerly 'getSelectedValues' but too close to another function.
Returns:
the JSONArray of JSONObjects representing the values [{column : value, ...}, ...]
Type
Array

getSelectedRowsIds() → {Array}

gets the selected rows Id
Returns:
the JSONArray representing the ids [id, ...]
Type
Array

getSortedColumns() → {object}

Get an array that contains the sorted columns
Returns:
Type
object

getTitle() → {String}

Return the title of the report
Returns:
Title of the report
Type
String

getTooltip() → {String}

This function returns the tooltip text of the widget
Returns:
Type
String

getType() → {String}

This function returns the type of the widget(RMP_Image, RMP_Html, RMP_Scripter, RMP_StaticTextwidget, RMP_Button, RMP_TextInput, RMP_ListBox, RMP_MultiSelectionCheckBox, RMP_RadioButton, RMP_Array, RMP_FileUpload... )
Returns:
Type
String

insertAbove(widget)

This function allows you to insert above widgetID, the new widget created thanks to new RMP_xxx() function
Parameters:
Name Type Description
widget object the inserted widget

insertAfter(widget)

This function allows you to insert on the left of widgetID, the new widget created thanks to new RMP_xxx() function
Parameters:
Name Type Description
widget object the inserted widget

insertBefore(widget)

This function allows you to insert on the right of widgetID, the new widget created thanks to new RMP_xxx() function
Parameters:
Name Type Description
widget object the inserted widget

insertBelow(widget)

This function allows you to insert below widgetID, the new widget created thanks to new RMP_xxx() function
Parameters:
Name Type Description
widget object the inserted widget

isActive() → {boolean}

This function returns true if the widget is active and false otherwise
Returns:
Type
boolean

isEnabled() → {boolean}

This function returns true if a widget is active and false otherwise
Returns:
Type
boolean

isIndexed() → {boolean}

This function returns true if the the widget's variable is an array and false otherwise
Returns:
Type
boolean

isLoaded() → {boolean}

Returns:
true if the report has already been loaded, false otherwise
Type
boolean

isLoading() → {boolean}

Returns:
true if the report is loading data, false otherwise
Type
boolean

isVisible() → {boolean}

This function returns true if the widget is visible and false otherwise
Returns:
Type
boolean

moveAfter(widget)

This function allows you to move widgetID2 after (on the the right) widgetID1
Parameters:
Name Type Description
widget object the inserted widget

moveBefore(widget)

This function allows you to move widgetID2 before (on the left) widgetID1
Parameters:
Name Type Description
widget object the inserted widget

refresh(deep)

Refresh the report
Parameters:
Name Type Description
deep boolean if false the resfresh will keep the pagination as well as the manual filters that have been input. True by default.

remove(widget)

This function allows you to remove widgetID. If removeVariable is set to true, it will also deleted content of variable attached to widget
Parameters:
Name Type Description
widget object the inserted widget

resizeColumn(columnName, width)

Sets the width of the given column
Parameters:
Name Type Description
columnName RMP_Report.RMP_AppliReport | RMP_Report.RMP_ProcessReport the column to resize
width String the integer representing the column's width in px
See:

select(rowIndex)

Select the row that have the given rowIndex
Parameters:
Name Type Description
rowIndex String row's index

selectAll()

Select all rows

setActive(active)

This function allows to set the widget as active/inactive
Parameters:
Name Type Description
active boolean

setAggregate(aggregate)

Set the aggregation pipelines of Collection Report
Parameters:
Name Type Description
aggregate String New aggregation pipelines of collection report

setCalculatedColumnRule(columnName, rule)

Sets the rule for the given the calculated row
Parameters:
Name Type Description
columnName String the column to affect
rule String the rule to set. Inserting inside the rule patterns like [[column_name]] let you refer to the value of the cell of the column_name column for the concerning row.

setColumnHeader(columnName, header)

Set the header of a report column
Parameters:
Name Type Description
columnName String the name of the column to modify
header String the new header

setColumnHeaderByIndex(columnIndex, header)

Set the header of a report column
Parameters:
Name Type Description
columnIndex String the index of the column to modify
header String the new header

setColumnVisible(columnName, visible)

Parameters:
Name Type Description
columnName String the name of the column to be set visible.
visible boolean visibility of the column.

setData(data, options)

Fills the report with a JSON object
Parameters:
Name Type Description
data object The JSON object used to fill the report
options object options to be used to fill the report
Example
   var data = [{"column1":"valueA","column2":"valueB"},{"column1":"valueC","column2":"valueD"}];
   var options = {count:2,first:0};
   id_report.setData(data,options);
 

setEnabled(e)

This function allows to set a widget as active/inactive
Parameters:
Name Type Description
e boolean

setLoading(loading)

Displays the report spinner while loading data
Parameters:
Name Type Description
loading boolean displays the spinner if true or hides it otherwise

setPostLoadedScript(script)

Sets a script that will be executed after the loading of the report
Parameters:
Name Type Description
script String

setQuery(query)

Set the query of Collection Report
Parameters:
Name Type Description
query String New query of collection report
Set the url used to load the report
Parameters:
Name Type Description
link String report resource url

setTitle(title)

Set the title of the Report
Parameters:
Name Type Description
title String New title of the report

setTooltip(tooltip)

This function sets the tooltip text of the widget
Parameters:
Name Type Description
tooltip String

setVisible(v)

This function allows to set the widget as visible/invisible
Parameters:
Name Type Description
v boolean

unselect(rowIndex)

Unselect the row that have the given rowIndex
Parameters:
Name Type Description
rowIndex String row's index

unselectAll()

Unselects all rows