xxen_report
The report engine. Only the routines documented here are supported for direct use.
Summary
| Routine | Description |
|---|---|
| write_log | Writes a line to the log file of the running concurrent request, or to the FND debug log (module XXEN, level p_log_level) outside a request. |
| report_id | Returns the report id of a report or upload by its name in any installed language, preferring the base language and then US; null when no report has this name. |
| option_value | Returns the value of a runtime option of a run, such as TEMPLATE_NAME, OUTPUT_FORMAT, EMAIL, ROW_LIMIT or ORGANIZATION_ID; null when the run has no value for it. |
| max_column_length | Returns the maximum length in bytes of a column alias on this database: 30 before Oracle 12.2, 128 from 12.2 on. |
| column_translation | Returns the heading Blitz Report shows for a column alias: the dynamic column translation, else the column translation for the session language, else the alias in title case (INVOICE_AMOUNT becomes Invoice Amount). |
| id_to_value | Returns the display value of a parameter's LOV for the id p_id, or p_id itself when the LOV does not return it or its value equals its id. |
| value_to_id | Returns the id of a parameter's LOV for the display value p_value, or p_value itself when the LOV does not return it or its value equals its id. |
| initialize_run_param_vals_tmp | Loads the parameters of a report into the session's run screen table, without values, as the run screen does when it opens a report. |
| initialize_parameter_values | Applies the default values of the report, the user and the template p_template_id to the parameters loaded by initialize_run_param_vals_tmp and validates them against their LOVs, as the run screen does. |
| parse_report_sql_columns | Parses the report SQL and writes its columns, data types and lengths into the session table xxen_report_sql_columns; returns null on success, else an error message such as Error parsing SQL. |
| template_id | Returns the id of a report's template by its exact name; null when the report has no template of that name. |
Routines
write_log
procedure write_log(p_text in varchar2, p_log_level in pls_integer default 1)
Writes a line to the log file of the running concurrent request, or to the FND debug log (module XXEN, level p_log_level) outside a request. Use it for the log output of a report DB_PACKAGE or an upload package; outside a request the line is visible only when FND debug logging is enabled.
report_id
function report_id(p_report_name in varchar2) return pls_integer
Returns the report id of a report or upload by its name in any installed language, preferring the base language and then US; null when no report has this name. xxen_api.report_id matches the name in the session language only.
option_value
function option_value(p_run_id in number, p_option_name in varchar2) return varchar2
Returns the value of a runtime option of a run, such as TEMPLATE_NAME, OUTPUT_FORMAT, EMAIL, ROW_LIMIT or ORGANIZATION_ID; null when the run has no value for it.
max_column_length
function max_column_length return pls_integer
Returns the maximum length in bytes of a column alias on this database: 30 before Oracle 12.2, 128 from 12.2 on. Truncate generated aliases with it, for example substrb(<heading>,1,xxen_report.max_column_length), so that dynamic SQL also parses on older databases.
column_translation
function column_translation( p_column_name in varchar2, p_disable_column_translations in varchar2 default null, p_template_id in pls_integer default null, p_disable_dyn_col_translations in varchar2 default null ) return varchar2
Returns the heading Blitz Report shows for a column alias: the dynamic column translation, else the column translation for the session language, else the alias in title case (INVOICE_AMOUNT becomes Invoice Amount). A double-quoted mixed-case alias is returned unchanged. With p_template_id, the template aggregation of the column is appended, for example Invoice Amount (Sum).
id_to_value
function id_to_value(p_parameter_id in pls_integer, p_id in varchar2) return clob
Returns the display value of a parameter's LOV for the id p_id, or p_id itself when the LOV does not return it or its value equals its id. Pass a single id: a multiple values string (starting with <multiple_values>) is not split.
value_to_id
function value_to_id(p_parameter_id in pls_integer, p_value in varchar2) return varchar2
Returns the id of a parameter's LOV for the display value p_value, or p_value itself when the LOV does not return it or its value equals its id.
initialize_run_param_vals_tmp
procedure initialize_run_param_vals_tmp(p_report_id in number)
Loads the parameters of a report into the session's run screen table, without values, as the run screen does when it opens a report. Call it first when a script prepares a run the way the run screen does, then initialize_parameter_values to apply the defaults.
initialize_parameter_values
function initialize_parameter_values(p_report_id in number, p_default_first_lov_value in varchar2 default null, p_template_id in number default null, p_setup_mode in varchar2 default null, p_template_conditions in varchar2 default null) return varchar2
Applies the default values of the report, the user and the template p_template_id to the parameters loaded by initialize_run_param_vals_tmp and validates them against their LOVs, as the run screen does. Returns the validation messages, null when all values are valid; a default the LOV does not return is dropped. p_default_first_lov_value Y fills a required parameter that has no default with the first value of its LOV.
parse_report_sql_columns
function parse_report_sql_columns(p_report_id in pls_integer, p_skip_delete in varchar2 default null) return varchar2
Parses the report SQL and writes its columns, data types and lengths into the session table xxen_report_sql_columns; returns null on success, else an error message such as Error parsing SQL. A SQL with &lexicals is built from the session's parameter values, so run initialize_run_param_vals_tmp and initialize_parameter_values first. The table is session-specific and the function commits.
template_id
function template_id(p_report_id in pls_integer, p_template_name in varchar2) return pls_integer
Returns the id of a report's template by its exact name; null when the report has no template of that name.
Generated from Blitz Report 3.3.7 on .