modules/Reports/Report.php
\Report
- Children
- \SubpanelFromReports
Properties
$default_report_def_str= ''{"report_type":"tabular","display_columns":[],"summary_columns":[],"order_by":[{"name":"","sort_dir":""}],"filters_def":[],"group_defs":[],"links_def":[],"module":"Accounts","chart_type":"hBarF","chart_description":""}''
'{"report_type":"tabular","display_columns":[],"summary_columns":[],"order_by":[{"name":"","sort_dir":""}],"filters_def":[],"group_defs":[],"links_def":[],"module":"Accounts","chart_type":"hBarF","chart_description":""}'
Details- Type
- n/a
array
$invalid_fields= 'array()'
Array of invalid report fields. Populated during is_definition_valid() call.
array()
Details- Type
- array
Methods
Report(
$report_def_str
=
'', $filters_def_str
=
'', $panels_def_str
=
''
)
:
void
Name | Type | Description |
---|---|---|
$report_def_str | ||
$filters_def_str | ||
$panels_def_str |
create_group_by(
$register_group_by
=
true
)
:
void
Name | Type | Description |
---|---|---|
$register_group_by |
create_query(
$query_name
=
'query', $field_list_name
=
'select_fields'
)
:
void
Name | Type | Description |
---|---|---|
$query_name | ||
$field_list_name |
create_select(
$key
=
'display_columns', $field_list_name
=
'select_fields'
)
:
void
Name | Type | Description |
---|---|---|
$key | ||
$field_list_name |
execute_query(
$query_name
=
'query', $result_name
=
'result', $row_count_name
=
'row_count', $row_start_name
=
'row_start', $row_end_name
=
'row_end', $limit
=
false
)
:
void
Name | Type | Description |
---|---|---|
$query_name | ||
$result_name | ||
$row_count_name | ||
$row_start_name | ||
$row_end_name | ||
$limit |
filtersIterate(
$filters, $where_clause
)
:
void
Name | Type | Description |
---|---|---|
$filters | ||
$where_clause |
filtersIterateForUI(
$filters, $verdef_arr_for_filters
)
:
void
Name | Type | Description |
---|---|---|
$filters | ||
$verdef_arr_for_filters |
fixReportDefs(
)
:
void
Bug #52757 Tries to find missed relations and removes them from full_table_list
getColumnFieldName(
array $display_column
)
:
string
Get data field name for the display column
Name | Type | Description |
---|---|---|
$display_column | array |
Type | Description |
---|---|
string |
getDataTypeForColumnsForMatrix(
$column_field_name
=
'summary_columns'
)
:
void
Name | Type | Description |
---|---|---|
$column_field_name |
getExt2FieldDefSelectPiece(
\$field_def $field_def, \$add_alias $add_alias
=
true
)
:
void
getExt2FieldDefSelectPiece
This is a private helper function to separate a piece of code that creates the select statement for a field where there is an aggregation of columns
Name | Type | Description |
---|---|---|
$field_def | \$field_def | Array representing the field definition to build the select piece for |
$add_alias | \$add_alias | boolean true to add the column alias, false otherwise (you would want false for group by) |
getTruncatedColumnAlias(
$column_name
)
:
void
getTruncatedColumnAlias This function ensures that a column alias is no more than 28 characters. Shoulud the column_name argument exceed 28 charcters, it creates an alias using the first 22 characters of the column_name plus an md5 of the first 6 characters of the lowercased column_name value.
Name | Type | Description |
---|---|---|
$column_name |
get_header_row(
$column_field_name
=
'display_columns', $skip_non_group
=
false, $exporting
=
false, $force_distinct
=
false
)
:
void
Name | Type | Description |
---|---|---|
$column_field_name | ||
$skip_non_group | ||
$exporting | ||
$force_distinct |
get_header_row_generic(
$column_field_name
=
'display_columns', $skip_non_group
=
false, $exporting
=
false, $force_distinct
=
false
)
:
void
Name | Type | Description |
---|---|---|
$column_field_name | ||
$skip_non_group | ||
$exporting | ||
$force_distinct |
get_next_row(
$result_field_name
=
'result', $column_field_name
=
'display_columns', $skip_non_summary_columns
=
false, $exporting
=
false
)
:
void
Name | Type | Description |
---|---|---|
$result_field_name | ||
$column_field_name | ||
$skip_non_summary_columns | ||
$exporting |
is_definition_valid(
)
:
bool
Whether the report definition is valid (currently only column definitions are considered).
Type | Description |
---|---|
bool |
is_layout_def_valid(
array $layout_def
)
:
bool
Whether specified layout definition is valid.
Name | Type | Description |
---|---|---|
$layout_def | array |
Type | Description |
---|---|
bool |
parseUIFiltersDef(
$filters_def_str, $panels_def_str
)
:
void
Name | Type | Description |
---|---|---|
$filters_def_str | ||
$panels_def_str |
run_summary_combo_query(
$run_main_query
=
true
)
:
void
Name | Type | Description |
---|---|---|
$run_main_query |
select_already_defined(
$select, $which
=
'select_fields'
)
:
void
Name | Type | Description |
---|---|---|
$select | ||
$which |