1 Simple list channel

The following example is a simple channel displaying some store metrics by city in a simple list.

 

1.1 Channel SQL

SQL statement sentence:

Copy
<select>
    <columns>
        store_city,
        SUM(store_sales)  <alias name='store_sales'/>,
        SUM(store_cost)   <alias name='store_cost'/>,
        SUM(unit_sales)   <alias name='unit_sales'/>
    </columns>
    <from table='sales_fact_1998' >
        <join table='store'>
            <on>store.store_id = sales_fact_1998.store_id</on>
        </join>
        </from>
        <group>1</group>
</select>
 

1.2 Channel output fields

Assign a table to each columns so that the labels can be used from the dictionary database. In the example below can be seen how the column store_sales has been assigned to the table sales_fact_1998 and so on.

 

1.3 Result

Channel Execution Result:

 

2 Basic filtering

In the following example we will allow the user to decide which states want to view. We will need to change the SQL:

Copy
<select>
    <columns>
        store_city,
        SUM(store_sales)  <alias name='store_sales'/>,
        SUM(store_cost)   <alias name='store_cost'/>,
        SUM(unit_sales)   <alias name='unit_sales'/>
    </columns>
    <from table='sales_fact_1998' >
        <join table='store'>
            <on>store.store_id = sales_fact_1998.store_id</on>
        </join>
    </from>
    <where>
        store_state IN $0
    </where>
    <group>1</group>
</select>

And add the following options to the data selection box:

Info

The value defined in object must be an object defined in wic_jrep_object

That is, in this example it must exist an object called store_states


 

3 Column styles

The following example shows how to add column styles.

 

3.1 Channel output fields

This section contains the 'Style' box, where te user can define the style of the wished column.

The styles available by default are:

  • Aligment: Sets the text aligment (AUTO, LEFT, RIGHT, CENTER or JUSTIFY).
  • Up is:
    • Neutral: No style aplyed.
    • Good: Background color green for positive values and red for negative.
    • Bad: Background color red for positive values and green for negative.
  • Decim.: Decimals displayed.

For more customized styles use Range and Range column, where Range is assigned with a 'Channel range' and the Range column refers to the column wich values will determine the style.

 

3.2 Ranges of the channel columns

This feature has been replaced by the Table Colorizer view util. See Table Colorizer section for further information.

 

3.3 Result

 

4 Groups and totals

In the following case is shown how to group columns and get totals.

 

4.1 Channel output fields

The headland used to implement the groups and totals is the 'Atributes' box. The two parameters that the user needs to modify for this purpose are Group and Total.

For this example one column with customers information, 'fullname', has been added.

In order to group the information by cities, notice that the Group parameter in 'store_city' has value 1. This will group the information by the store's city.

Also, see that the Total check box is selected on 'store_sales', 'store_cost' and 'unit_sales' columns. As it is shown in the Result section, this is going to display an extra row, for each group, with the total value corresponding to each column.

 

4.2 Result

 

5 List with links

The following example shows how to incorporate links to the values of a column. Those are usually for showing up more details about the linked value, or even change some information of it.

 

5.1 Channel output fields

The area in charge of this purpose is the 'Links' box, where the user must specify the Type of column link, the Link code and the Condition.

On this example, the customer information will be linked by its name on the table. For this, an SQL Object is used as a 'Type of column link' and the 'Link code' corresponds to the object that is going to be called. The 'Condition' points out which information of the SQL object is going to be displayed.

See in the Result area below, how the customer name has changed its style, as it has became a link.

 

5.2 Result

 

6 List with grouped headers

This section explains how to create headers that can group multiple columns.

 

6.1 Channel output fields

The parameter responsible for this is the Header, located in the 'Attributes' box. See in the table below how are they assigned to the columns.

The headers must exist, that means that they have to be pre-defined in the 'Column headers' section.

 

6.2 Column Header definition

 

6.3 Result

 

7 List with editable columns

 

7.1 Channel output fields

The values of a column can be editable. To allow this, the Editable checkbox on the 'Attributes' box needs to be selected.

Nevertheless, there are two indispensable conditions to consider:

  • The column must belong to the principal table of the select.
  • Also the rowid of this table has to be defined (can be hidden).

The editable column may be an input, a select or a checkbox, depending on the attribute it has associated.

It is important to bear in mind that columns with graphs, SVG or a superlist graph, can't be edited by the user at the desktop.

 

7.2 Result