Query Field Nodes Layout


Query Fields

Query fields are a clone of all report fields with additional nodes from underlying database fields and a few custom nodes. Query fields are created per user session or when the profile changes. Query fields provide a quick lookup for any related report field parameter when doing report element queries or when assembling report elements. The query_header passed as an argument to query_db_for_report() contains query_fields.

Query Field Nodes

derivation_method

database_field_name

report_field_name

report_field_label

column_label

aggregation_method

table_field_name
table_field_type
type

display_format_type

category

subitems_level

show_remainder_value

show_average_value

show_min_value

show_max_value

show_total_value

is_left_text_alignment

is_expression

is_aggregating_field

percent_calculation

is_date_time_in_epoc

field_name

Most query field nodes are self-explanatory, i.e. database_field_name, etc; it is simply the value of the underlying database field. So the list includes only properties which are not part of report fields or database fields or which requires specific information.



derivation_method
Type: string
Values:database_field
session_field
expression
Relevant:always
Notes:Required by C++.


table_field_name
Type: string
Values:The table_field_name is equal the report field node name.
Default value:
Relevant:always
Notes:Required by C++.


table_field_type
Type: string
Values:int
float
database_itemnum
custom_itemnum
Relevant:always
Notes:Required by C++ and Salang


type
Type: string
Values:int
float
string
Relevant:always
Notes:The type in a query field is the type of a database field if the reprt is based on a database field, else it is the type of the reprt field.


is_left_text_alignment
Type: boo|
Values:-
Relevant:always
Notes:Defines if the html column is aligned left or right.
The value is derived from report_fields.N.column_alignment.

Query Field Types

We distinguish between non-aggregating-fields, aggregating-fields and main-fields.

Non-Aggregating-Fields

These are report fields that are based on a database field where the database field aggregation_method="none" or report fields with an expression with report field type ="string".

Aggregating-fields

These are report fields that are based on a database field where the database field aggreation_method is not "none" or report fields with an expression with report field type set to "int" or "float".

Main fields

Main fields are non-aggregating report fields that are based on a database field.

Aggregating fields that require special caution

Database fields where the category is session_begin or session_end are int fields that give the date_time in epoc!

We recognize epoc values by checking the type and display format type, if type="int" and display_format_type="date_time", then we assume an epoc value.

Aggregating-fields / remainder, average, min, max and sum display, show percent column, graphs

For every aggregating-field, we calculate the remainder and allow aggregation of average, min, max and sum. We also allow a percent column, bar graph column, graph and time series graph. We even allow this if the field has an epoc or duration value. It means we don't limit aggregating-fields in any way.

If an aggregate value is actually displayed in the aggregation row (average, min, max, sum) is defined in the report_field by aggregate_average, aggregate_min, aggregate_max, aggregate_sum, i.e. for the visitor column (aggregation_method="unique") the aggregate_sum property is set to false as default. Yet we aggregate the sum (for percent column and remainder value calculation) but only show a dash in the totals row.