COLUMNS / COLUMNAS

English (Español a continuación)

In this lesson we look at different commands that are used in the Report Script to format columns:

  • COLHEADING / SUPCOLHEADING
  • IMHEADING
  • NAMEWIDTH
  • WIDTH
  • ORDER
  • FIXCOLUMNS
  • FORMATCOLUMNS
  • NAMESCOL
  • SYM / ASSYM
  • BLOCKHEADERS / PYRAMIDHEADERS
  • TABDELIMIT

1.- COLHEADING.

Activates the display of column headers.

  • Used in the middle of row members to include column headers that would not otherwise go.

By default, page and column headers are presented:

  • Every time a new page is generated.
  • Every time a member changes in the page or column dimensions.

Syntax:

  • {COLHEADING}

It can be used within the STARHEADING … ENDHEADING definition to position column headers in relation to other elements in the specific header definition.

Also, this command displays the column headers after they have been deleted with commands like:

  • SUPCOLHEADING
  • SUPHEADING
  • SUPALL

If a Report Script includes several Reports (each of them ending with the corresponding “ ! ” sign) and initially the column headers have been eliminated (with any of the previous commands), if later on you want to show the column headers again this command is used.

Let’s look at an example:

Suppose a Report Script with the following row definition:

  • <ROW(Markets,Products,Data)
  • Spain
  • Mobile
  • Computers
  • Sales
  • Costs
  • Benefits

The output is:

If we include this command:

  • <ROW(Markets,Products,Data)
  • Spain
  • Mobile
  • {COLHEADING}
  • Computers
  • Sales
  • Costs
  • Benefits

The output is:

2.- SUPCOLHEADING

This command deletes the column headers.

  • By default, they are displayed.

Syntax:

  • {SUPCOLHEADING}

This command is placed at the top of the Report Script before entering the Page / Column / Row definition.

If in the previous example we include this command, the output is:

3.- IMMHEADING

Enables the display of page and column headers.

  • Unlike the {COLHEADING} command that only includes the column headers.

Used in the middle of row members to include column and page headers that would not otherwise go. By default, page and column headers are presented:

  • Every time a new page is generated.
  • Every time a member changes in the page or column dimensions.

Syntax:

  • {IMMHEADING}

4.- NAMEWIDTH

This command sets the width of all the columns that carry the names of the rows.

Its structure is:

  • {NAMEWIDTH [width]}

[width]: This is optional and determines the number of characters for each column.

  • If not set, Essbase applies 17 characters by default.

This command is placed at the top of the Report Script before entering the Page / Column / Row definition.

Some considerations:

  • If each column with a row name needs a different width, then the {WIDTH} command must be used.
  • When a name does not fit in the width of the column, the name is truncated with the character (~)

Let’s see an output with the default width versus an output applying the command {NAMEWIDTH 40}

5.- WIDTH

This command sets the width of the columns.

Syntax:

  • {WIDTH Number ColumnX ColumnY…}

The number indicates the width of the column.

ColumnaX ColumnaY ColumnaZ…: indicates with numbers the position of the column to which you want to apply this format; They are separated by space.

  • First come the columns with the row names (the first column is column 0), then the data columns, and finally the calculated columns.
  • If no column is specified, the selected width is applied to all data columns.

If this command is not used, the Report Script applies the necessary width to the columns to fit the widest value.

This command is placed at the top of the Report Script before entering the Page / Column / Row definition.

Let’s look at some examples:

  • {WITH 20 1 4}

It would apply to the 1st and 4th columns a width of 20 characters, applying the default width to the rest.

  • {WITH 25}
  • {WITH 30 1}

It would give all columns a width of 25 characters and specifically column 1 a width of 30 characters.

6.- ORDER

This command is used to order the columns in the Report Script.

Syntax:

  • {ORDER “Position”}

Position: it is the position that each column will occupy in the Report Script; positions are separated by blank spaces.

Each column is identified by the position it would originally occupy in the Report Script.

  • First come the columns with the row names (the first column is column 0), then the data columns, and finally the calculated columns.

All columns in the Report Script must be identified, unless the FIXCOLUMNS command is used to limit the number of columns to display.

Let’s look at an example:

  • {ORDER 4 3 0 1 2}

The first column presented in the Report Script is column 4, then column 3, column 0, column 1, and finally column 2.

If this command is used without column positions, the columns are displayed according to their original position.

Let’s look at another example:

The following Report Script:

Applying the command {ORDER 0 1 2 5 3 4}

7.- FIXCOLUMNS

This command is used to set the number of columns to be displayed in the Report Script, regardless of whether more members have been selected in the member selection.

Syntax:

  • {FIXCOLMNS Number}

Number: Indicates the number of data columns to display in the Report Script, starting from column 0 (which is the first column with member names).

This command can be placed at the top of the Report Script before entering the Page / Column / Row definition.

This command can be used in conjunction with the command {ORDER}:

  • With this command we order the columns and with the command {FIXCOLUMNS} we select the ones we want to show.

Let’s see an example: starting from the following Report Script definition:

  • <ROW(Markets,Products,Data)
  • Spain
  • Mobile
  • Computers
  • Printers
  • Sales
  • Costs
  • Benefits
  • <COLUMNS(Months)
  • January
  • February
  • March

The output is:

If we want to present exclusively the column with the data for March, we can order the data columns, placing this first, and select 4 columns (3 for names and this one for data).

  • {ORDER 0 1 2 5 3 4}
  • {FIXCOLUMNS 4}
  • <ROW(Markets,Products,Data)
  • Spain
  • Mobile
  • Computers
  • Sales
  • Costs
  • Benefits
  • <COLUMNS(Months)
  • January
  • February
  • March

The output is:

8.- FORMATCOLUMNS

This command is used to set the format:

  • Indicates to Essbase the number of columns of data that is expected to be displayed in the Report Script so that it can be taken into account when setting the format (for example, to center texts).
    • Essbase prepares the report structure for the indicated number of columns.
  • By default, as long as the number of columns is not specified, Essbase works at the formatting level considering that only 1 column is going to be displayed.
    • For example, if the command TEXT is used before specifying the number of columns and it is defined to be centered, Essbase centers it considering only 1 column (unless this command is used).

This command is not limiting (unlike the command FIXCOLUMNS): you can specify a number of columns and then show more columns in the Report Script.

Syntax:

  • {FORMATCOLUMNS Number}

Number: indicates the number of data columns expected to be presented in the Report Script.

This command can be placed at the top of the Report Script before entering the Page / Column / Row definition.

For example:

  • {FORMATCOLUMNS 6}: It is planned to show 6 columns in the Report Script for formatting purposes.

9.- NAMESCOL

This command allows to position the columns with the names of the rows in the Report Script.

Its structure is:

  • {NAMESCOL [“List of Columns” | CENTERED]}

The parameter [“List of columns” | CENTERED] sets the position of the name columns:

  • The position of each column is separated by spaces: the first position corresponds to the position that the first name column will occupy, the 2nd position corresponds to the 2nd name column…

This position can be fixed with:

  • “List of columns”: numbers that indicate the position that each column will occupy.
  • CENTERED (or C): Positions the columns in the center of the Report Script. Before using this parameter:
    • You must define all the columns of the Report or use the FORMATCOLUMNS command so that the central position is determined.

Let’s look at some examples:

  • {NAMESCOL 4 8} Places the first column of names in the 4th position and the second column of names in the 8th position.
  • {NAMESCOL c c 5} Places the first two name columns in the center of the Report Script and the 3rd name column in the 5th position.
  • {NAMESCOL c 6 9} Places the first column of names in the center of the Report Script, the second column of names in the 6th position and the third column of names in the 9th position.

For example, the following output:

Applying the command {NAMESCOL 2 3 4} it would be:

10.- SYM / ASSYM

By default, Essbase structures the Report Script:

  • Symmetrically when the dimensions that configure the columns have a different number of elements selected.
  • Asymmetrically when the dimensions that configure the columns have the same number of elements selected.

Let’s look at an example:

The following Report Script generates a symmetric report because the column dimensions have different number of members (Markets: 2 members / Months: 3 members):

  • <ROW(Products,Data)
  • <COLUMNS(Markets, Months)
  • Spain Italy
  • January February March

While the following Report Script generates an asymmetric report by default because the column dimensions have the same number of members (Markets: 3 members / Months: 3 members):

  • <ROW(Products,Data)
  • <COLUMNS(Markets, Months)
  • Spain, Italy, France
  • January February March

The <SYM command allows to apply a symmetric structure even in a context where, by default, Essbase would apply an asymmetric structure.

Syntax:

  • <SYM

If we want the previous Report Script to be presented symmetrically, we will include this command.

  • <SYM
  • <ROW(Products,Data)
  • <COLUMNS(Markets, Months)
  • Spain, Italy, France
  • January February March

If in a Report Script with different Reports (each of them ending with the corresponding sign ” ! “) we have initially used the <SYM command but in a later Report we want to annul its effect, we will use the command <ASYM:

  • Overrides a previous <SYM command so that Essbase reverts to using an asymmetric structure in cases where it is applied by`default.

Syntax:

  • <ASYM

11.- BLOCKHEADERS / PYRAMIDHEADERS

By default, Essbase applies a BLOCKHEADERS type column header structure to asymmetric Report Scripts:

While to the symmetric Report Scripts it applies a PYRAMIDHEADERS type column header structure:

The command {BLOCKHEADERS} allows to apply a BLOCKHEADERS type column header structure to symmetric Report Scripts (instead of the default PYRAMIDHEADERS structure).

  • For each column, it places as a header all the members that define it.
  • It is a command that applies exclusively to symmetric Report Scripts:
    • Either because it is the structure that Essbase applies by default, or because the <SYM command has been used

Syntax:

  • {BLOCKHEADERS}

This command can be placed at the top of the Report Script before entering the Page / Column / Row definition.

The {BLOCKHEADERS} command applied to the previous Report Script would generate the following output:

If in a Report Script with different Reports (each of them ending with the corresponding ” ! “ sign) we have initially used the command {BLOCKHEADERS} but in a later Report we want to annul its effect, we will use the command {PYRAMIDHEADERS}.

Syntax:

  • {PYRAMIDHEADERS}

This format cannot be used with asymmetric reports.

12.- TABDELIMIT

This command separates the different columns of a Report Script with tabs instead of separating them with spaces.

Syntax:

  • {TABDELIMIT}

This command is placed at the top of the Report Script before entering the Page / Column / Row definition.

This command is interesting to obtain a more compact Report Script. For example, when extracting data from a .txt file to load it into another database or as a back-up of the database data.

Español

En esta lección analizamos diferentes comandos que se utilizan en el Report Script para dar formato a las columnas:

  • COLHEADING / SUPCOLHEADING
  • IMMHEADING
  • NAMEWIDTH
  • WIDTH
  • ORDER
  • FIXCOLUMNS
  • FORMATCOLUMNS
  • NAMESCOL
  • SYM / ASSYM
  • BLOCKHEADERS / PYRAMIDHEADERS
  • TABDELIMIT

1.- COLHEADING.

Activa la presentación de las cabeceras de las columnas.

  • Se utiliza en mitad de los miembros de las filas para incluir cabeceras de columnas que de otro modo no irían.

Por defecto, las cabeceras de páginas y columnas se presentan:

  • Cada vez que se genera una página nueva.
  • Cada vez que cambia un miembro en las dimensiones de página o columna.

Sintaxis:

  • {COLHEADING}

Se puede utilizar dentro de la definición STARHEADING … ENDHEADING para situar las cabeceras de columnas en determinada posición en relación con otros elementos de la definición específica de cabecera.

También este comando presenta las cabeceras de columnas después de haber sido suprimidas con comandos como:

  • SUPCOLHEADING
  • SUPHEADING
  • SUPALL

Si un Report Script incluye diversos Reports (cada uno de ellos finalizado con el correspondiente signo “ ! “) e inicialmente se han eliminado las cabeceras de columnas (con alguno de los comandos anteriores), si posteriormente se quieren volver a mostrar las cabeceras de columnas se utiliza este comando.

Veamos un ejemplo:

Supongamos un Report Script con la siguiente definición de filas:

  • <ROW(Mercados,Productos,Datos)
  • España
  • Móviles
  • Ordenadores
  • Ventas
  • Costes
  • Beneficios

La salida es:

Si incluimos este comando:

  • <ROW(Mercados,Productos,Datos)
  • España
  • Móviles
  • {COLHEADING}
  • Ordenadores
  • Ventas
  • Costes
  • Beneficios

La salida es:

2.- SUPCOLHEADING

Este comando suprime las cabeceras de las columnas.

  • Por defecto se muestran.

Sintaxis:

  • {SUPCOLHEADING}

Este comando se sitúa en la parte superior del Report Script antes de entrar en la definición de Página / Columna / Fila.

Si en el ejemplo anterior incluimos este comando la salida es:

3.- IMMHEADING

Activa la presentación de las cabeceras de páginas y columnas.

  • A diferencia del comando {COLHEADING} que tan sólo incluye las cabeceras de columnas.

Se utiliza en mitad de los miembros de las filas para incluir cabeceras de páginas y columnas que de otro modo no irían. Por defecto, las cabeceras de páginas y columnas se presentan:

  • Cada vez que se genera una página nueva.
  • Cada vez que cambia un miembro en las dimensiones de página o columna.

Sintaxis:

  • {IMMHEADING}

4.- NAMEWIDTH

Este comando fija la anchura de todas las columnas que llevan los nombres de las filas.

Su estructura es:

  • {NAMEWIDTH [anchura]}

[anchura]: es opcional y determina el número de caracteres para cada columna.

  • Si no de fija Essbase aplica por defecto 17 caracteres.

Este comando se sitúa en la parte superior del Report Script antes de entrar en la definición de Página / Columna / Fila.

Algunas consideraciones:

  • Si cada columna con nombre de fila necesita una anchura diferente entonces hay que utilizar el comando {WIDTH}
  • Cuando un nombre no cabe en la anchura de la columna el nombre se trunca con el carácter (~).

Veamos una salida con la anchura por defecto frente a una salida aplicando el comando {NAMEWIDTH 40}

5.- WIDTH

Este comando fija la anchura de las columnas.

Sintaxis:

  • {WIDTH Número ColumnaX ColumnaY…}

El número indica la anchura de la columna.

ColumnaX ColumnaY ColumnaZ…: indica con números la posición de la columna a la que se quiere aplicar este formato; van separadas por espacio.

  • Primero van las columnas con los nombres de filas (la primera columna es la columna 0), luego las columnas de datos y por último las columnas calculadas.
  • Si no se indica ninguna columna la anchura seleccionada se aplica a todas las columnas de datos.

Si no se utiliza ese comando el Report Script aplica a las columnas el ancho necesario para que quepa el valor más ancho.

Este comando se sitúa en la parte superior del Report Script antes de entrar en la definición de Página / Columna / Fila.

Veamos algunos ejemplos:

  • {WITH 20 1 4}

Aplicaría a las columnas 1º y 4º una anchura de 20 caracteres, aplicando al resto la anchura por defecto.

  • {WITH 25}
  • {WITH 30 1}

Aplicaría a todas las columnas una anchura de 25 caracteres y específicamente a la columna 1 una anchura de 30 caracteres.

6.- ORDER

Este comando se utiliza para ordenar las columnas en el Report Script.

Sintaxis:

  • {ORDER “Posición”}

Posición: es la posición que va a ocupar cada columna en el Report Script; las posiciones van separadas por espacios en blanco.

Cada columna se identifica por la posición que originalmente ocuparía en el Report Script.

  • Primero van las columnas con los nombres de filas (la primera columna es la columna 0), luego las columnas de datos y por último las columnas calculadas.

Deben identificarse todas las columnas del Report Script, salvo que se utilice el comando FIXCOLUMNS para limitar el número de columnas que se va a mostrar.

Veamos un ejemplo:

  • {ORDER  4 3 0 1 2}

La primera columna que se presenta en el Report Script es la columna 4, luego la columna 3, la columna 0, la columna 1 y, finalmente, la columna 2.

Si se utiliza este comando sin posiciones de columnas, las columnas se presentan según su posición original.

Veamos otro ejemplo:

El siguiente Report Script:

Aplicando el comando {ORDER  0 1 2 5 3 4}

7.- FIXCOLUMNS

Este comando se utiliza para establecer el número de columnas que se van a mostrar en el Report Script, con independencia de que en la selección de miembros se hayan seleccionados más miembros.

Sintaxis:

  • {FIXCOLMNS Número}

Número: indica el número de columnas de datos que se van a mostrar en el Report Script, comenzando a contar desde la columna 0 (que es la primera columna con nombres de miembros).

Este comando se puede situar en la parte superior del Report Script antes de entrar en la definición de Página / Columna / Fila.

Este comando se puede utilizar conjuntamente con el comando {ORDER}:

  • Con este comando ordenamos las columnas y con el comando {FIXCOLUMNS} seleccionamos las que queremos mostrar.

Veamos un ejemplo: partiendo de la siguiente definición de Report Script:

  • <ROW(Mercados,Productos,Datos)
  • España
  • Móviles
  • Ordenadores
  • Impresoras
  • Ventas
  • Costes
  • Beneficios
  • <COLUMNS(Meses)
  • Enero
  • Febrero
  • Marzo

La salida es:

Si queremos presentar exclusivamente la columna con los datos de marzo podemos ordenar las columnas de datos, situando ésta en primer lugar, y seleccionar 4 columnas (las 3 de nombres y esta de datos).

  • {ORDER 0 1 2 5 3 4}
  • {FIXCOLUMNS 4}
  • <ROW(Mercados,Productos,Datos)
  • España
  • Móviles
  • Ordenadores
  • Ventas
  • Costes
  • Beneficios
  • <COLUMNS(Meses)
  • Enero
  • Febrero
  • Marzo

La salida es:

8.- FORMATCOLUMNS

Este comando se utiliza para fijar el formato:

  • Indica a Essbase el número de columnas de datos que está previsto mostrar en el Report Script a efectos de que lo tenga en consideración para fijar el formato (por ejemplo, para centrar textos).
    • Essbase prepara la estructura del informe para el número indicado de columnas.
  • Por defecto, mientras que no se especifique el número de columnas, Essbase trabaja a nivel de formato considerando que se va a mostrar 1 sola columna.
    • Por ejemplo, si un comando TEXT se utiliza antes de especificar el número de columnas y se define que vaya centrado, Essbase lo centra considerando 1 sóla columna (a menos que se utilice este comando).

Este comando no es limitativo (a diferencia del comando FIXCOLUMNS): se puede especificar un número de columnas y luego en el Report Script mostrar más columnas.

Sintaxis:

  • {FORMATCOLUMNS Número}

Número: indica el número de columnas de datos que se espera presentar en el Report Script.

Este comando se puede situar en la parte superior del Report Script antes de entrar en la definición de Página / Columna / Fila.

Por ejemplo:

  • {FORMATCOLUMNS 6}: Se prevé mostrar en el Report Script 6 columnas a efectos de formato.

9.- NAMESCOL

Este comando permite posicionar en el Report Script las columnas con los nombres de las filas.

Su estructura es:

  • {NAMESCOL [“Lista de columnas” | CENTERED]}

El parámetro [“Lista de columnas” | CENTERED] fija la posición de las columnas de nombres:

  • La posición de cada columna va separada por espacios: la primera posición corresponde a la posición que va a ocupar la primera columna de nombre, la 2ª posición corresponde a la 2ª columna de nombre…

Esta posición se puede fijar con:

  • “Lista de columnas”: números que indican la posición que va a ocupar cada columna.
  • CENTERED (o C): Posiciona las columnas en el centro del Report Script. Antes de utilizar este parámetro:
    • Hay que definir todas las columnas del Report o utilizar el comando FORMATCOLUMNS para que quede determinada la posición central.

Veamos algunos ejemplos:

  • {NAMESCOL 4 8} Sitúa la primera columna de nombre en la 4ª posición y la segunda columna de nombres en la 8ª posición.
  • {NAMESCOL c c 5} Sitúa las dos primeras columnas de nombre en el centro del Report Script y la 3ª columna de nombres en la 5ª posición.
  • {NAMESCOL c 6 9} Sitúa la primera columna de nombre en el centro del Report Script, la segunda columna de nombres en la 6ª posición y la tercera columna de nombres en la 9ª posición.

Por ejemplo, la siguiente salida:

Aplicando el comando {NAMESCOL 2 3 4} quedaría:

10.- SYM / ASSYM

Por defecto, Essbase estructura el Report Sricpt:

  • De forma simétrica cuando las dimensiones que configuran las columnas tienen seleccionado distinto número de elementos.
  • De forma asimétrica cuando las dimensiones que configuran las columnas tienen seleccionado el mismo número de elementos.

Veamos un ejemplo:

El siguiente Report Script genera un informe simétrico porque las dimensiones de columnas tienen distinto número de miembros (Mercados: 2 miembros / Meses: 3 miembros):

  • <ROW(Productos,Datos)
  • <COLUMNS(Mercados,Meses)
  • España, Italia
  • Enero, Febrero,Marzo

Mientras que el siguiente Report Script genera por defecto un informe asimétrico porque las dimensiones de columnas tienen el mismo número de miembros (Mercados: 3 miembros / Meses: 3 miembros):

  • <ROW(Productos,Datos)
  • <COLUMNS(Mercados,Meses)
  • España, Italia, Francia
  • Enero, Febrero,Marzo

El comando <SYM permite aplicar una estructura simétrica incluso en un contexto en el que por defecto Essbase aplicaría una estructura asímétrica.

Sintaxis:

  • <SYM

Si queremos que el Report Script anterior se presente de forma simétrica incluiremos este comando.

  • <SYM
  • <ROW(Productos,Datos)
  • <COLUMNS(Mercados,Meses)
  • España, Italia, Francia
  • Enero, Febrero,Marzo

Si en un Report Script con diferentes Reports (cada uno de ello finalizado con el correspondiente signo ” ! “) hemos utilizado inicialmente el comando <SYM pero en un Report posterior queremos anular su efecto utilizaremos el comando <ASYM:

  • Anula un comando <SYM anterior de modo que Essbase vuelva a utilizar una estructura asimétrica en aquellos casos en los que `por defecto corresponda.

Sintaxis:

  • <ASYM

11.- BLOCKHEADERS / PYRAMIDHEADERS

Por defecto Essbase aplica a los Report Scripts asimétricos una estructura de cabecera de columna de tipo BLOCKHEADERS:

Mientras que a los Report Scripts simétricos aplica una estructura de cabecera de columna de tipo PYRAMIDHEADERS:

El comando {BLOCKHEADERS} permite aplicar a los Report Scripts simétricos una estructura de cabecera de columna de tipo BLOCKHEADERS (en lugar de la estructura por defecto PYRAMIDHEADERS).

  • Para cada columna sitúa como cabecera todos los miembros que la definen.
  • Es un comando que se aplica exclusivamente a los Report Script simétricos:
    • Bien porque sea la estructura que Essbase aplica por defecto, bien porque se haya utilizado el comando <SYM

Sintaxis:

  • {BLOCKHEADERS}

Este comando se puede situar en la parte superior del Report Script antes de entrar en la definición de Página / Columna / Fila.

El comando {BLOCKHEADERS} aplicado al Report Script anterior generaría la siguiente salida:

Si en un Report Script con diferentes Reports (cada uno de ello finalizado con el correspondiente signo ” ! “) hemos utilizado inicialmente el comando {BLOCKHEADERS} pero en un Report posterior queremos anular su efecto utilizaremos el comando {PYRAMIDHEADERS}.

Sintaxis:

  • {PYRAMIDHEADERS}

Este formato no se puede utilizar con informes asimétricos.

12.- TABDELIMIT

Este comando separa con tabulaciones las distintas columnas de un Report Script en lugar de separarlas con espacio.

Sintaxis:

  • {TABDELIMIT}

Este comando se sitúa en la parte superior del Report Script antes de entrar en la definición de Página / Columna / Fila.

Este comando es interesante para obtener un Report Script más compacto.

  • Por ejemplo, cuando se hace una extracción de datos en un fichero .txt para cargarlo en otra base de datos o como back-up de los datos de la base.
Anuncio publicitario