Skip to main content
insightsoftware Documentation insightsoftware Documentation
{%article.title%}
Published:
Was this article helpful?
0 out of 0 found this helpful

Creating Attribute-Based Report Apps

You can use attribute-based report apps to analyze your Longview data based on defined attribute values.

Specifying overall settings

You can specify overall display and formatting options for the report.

Display options:

Field Notes

Display dimensions

Select the dimensions that you would like to display in the attribute-based report.

Note: The Display Dimension cannot be a Dimension corresponding to values.

Output

Select the way you would like to view your display dimensions:

  • Name: A single column for each Display dimension will be visible showing the symbols name
  • Description: A single column for each Display dimension will be visible showing the symbols description.
  • Name and Description: Two columns for each display dimension will be visible - one displaying the symbols name and the other displaying the symbols description.

Values options:

Field Notes

Dimension corresponding to values

Specify the dimension for which you would like to see the values.

Note: The Dimension corresponding to values cannot be a Display Dimension.

Output

Select the way the column header(s) will display for a values dimension:

  • Name: A single column for each Display dimension will be visible showing the symbols name
  • Description: A single column for each Display dimension will be visible showing the symbols description.
  • Name and Description: Two columns for each display dimension will be visible - one displaying the symbols name and the other displaying the symbols description.

Data type

Select ADJUSTED to query adjusted data (unadjusted + journal entries) or UNADJUSTED to query data excluding journal entries

Number formatting:

Field Notes

Default decimals

Enter the number of decimals to display for each numeric value. Generally this should be from 0 to 9.

Use parentheses for negative numbers

Select Yes to display negative numbers with parentheses.

Select No to display negative numbers with a negative sign

Use thousands separator for numbers

Select Yes to display a locale-specific thousands separator based on the operating system setting.

Select No to not display a thousands separator.

Specifying attribute columns

Use the Attribute Columns to add attributes you would like to analyze to your attribute-based report.

To add an attribute column

  1. Right-click on attribute Columns and select Add Attribute.
  2. Fill in the following fields:
    1. Attribute: Select the symbol attribute you would like to display in the report.

    2. Description: Specify the description that will display as the column header for the attribute column.

    3. Source dimension: Specify the source dimension the symbol attribute data is based on.

Specifying pre-selection commands

Use pre-selection to perform any commands before symbol selection. The typical use of pre-selection is to perform advanced logic to determine default selections or set the range of possible symbols. Pre-selection commands are executed after symbol selection settings are applied from the app configuration, so all symbol selection variables have been created at this point.

See Generating a symbol selection form for details on symbol selection variables.

Note: Using pre-select commands to set default or symbols overrides the settings in User Selections.

Variable Notes

<Dimension>Default

Specify the default selection in the symbol selector, for the Dimension.

<Dimension>Symbols

Specify the list of available selections in the symbol selector for the Dimension.

Example: Setting the list of possible symbols to all YTD periods

Create VARIABLE ytdPeriodList AS RANGE

Set VARIABLE ytdPeriodList = "[[SYSTEM,SGPTimePeriodsYTD,DBDEFAULT]]"

For EACH ytdPeriod in ytdPeriodList

    Set VARIABLE TIMEPERIODSSymbols = ListAppend(TIMEPERIODSSymbols, "$ytdPeriod$#99")

Next

Specifying user selections

Use user selections to specify dimensions for which the user will be prompted to choose symbol(s). For each dimension that the user will choose symbols, right-click on the User Selections folder and choose Add Dimension. The dimension settings page will appear.

Variable Notes

Dimension

Select the dimension the user will be prompted to select symbol(s) for.

Available selections

Select a symbol to limit the possible symbols available to the user. If left blank the user will be able to select from all symbols available in the dimension. The available symbols will always be limited by user access.

Default selection

Select a symbol to specify as the default selection. This can either be a database symbol, an attribute symbol, or a floating time period.

Note: Attribute symbols and floating time periods will only be available if they are defined in your system.
For more information, see “Specifying attributes in Longview Application Administrator” in the Longview Analysis and Reporting Guide.

Selection required

Check this to force the user to select a symbol to continue.

Allow leaf selection

Check this to allow the user to select a leaf symbol.

Allow parent selection

Check this to allow the user to select a parent symbol.

Allow read-only selection

Check this to allow the user to select a read-only symbol.

Allow multiple selections

Check this to allow the user to select more than one symbol.

Attribute filter

Enter an attribute filter expression to further limit the possible symbol selections.
For more information see SymbolSelector in the Longview Developer’s Guide.

Specifying attribute-based selections

Use Attribute Based Selections to specify selections for dimensions that are deter- mined by an attribute value. For each dimension to be determined via an attribute, right-click on Attribute Based Selections and select Add Dimension.

Variable Notes

Dimension

Select the dimension to select symbol(s) using an attribute value.

Attribute class

Select the class of attribute to use.

Attribute name

Select the attribute.

Source dimension (SYMBOL class)

If the attribute class is SYMBOL, select the source dimension.

Note: The source dimension must be a dimension specified as a user selection or attribute-based selection.

Note: The variable created to hold the attribute-based symbol will have the same name as the dimension. The variable created will be a STRING type.

Example, to set the currency selection to be the functional currency of the selected entity:

  1. Select the CURRENCIES dimension.
  2. Set the attribute class to SYMBOL.
  3. Enter “ZGPNativeCurrency” for the attribute name.
  4. Select ENTITIES for the source dimension.

Example, to set the time period selection to be the current period:

  1. Select the TIMEPERIODS dimension.
  2. Set the attribute class to SYSTEM.
  3. Enter “SGPCurrentPeriod” for the attribute name.

Specifying post-selection commands

Use post-selection to perform any commands after symbol selection, but before any data areas are created. The typical use of post-selection commands is to perform advanced symbol selection tasks. For example, you might use post-selection to create a list of all standard intercompany accounts. In addition, you may want to use a form to further refine selection, or instead of the template provided symbol selection.

Caution: Post-selection commands are executed as part of symbol selection within a view. Any Create VARIABLE commands will cause an error during symbol reselection. If “Allow user to change selections in view” is allowed, either create variables only in pre-selection, or wrap variable creation in VariableExists checks.

Example: Get a list of all standard intercompany accounts

If Not(VariableExists("ACCOUNTS"))

    Create VARIABLE ACCOUNTS AS RANGE

END If

 

Set VARIABLE ACCOUNTS = CreateList(SYMBOLS, DATABASE, ACCOUNTS, "TB###")

Set VARIABLE ACCOUNTS = FilterList(ACCOUNTS, "[[SYMBOL,ZElimICSchTransactions,THIS]] == 'ICStandard'")

Example: Specifying multiple attribute time periods (current forecast and budget period)

If Not(VariableExists("TIMEPERIODS"))

    Create VARIABLE TIMEPERIODS AS RANGE

END If

Set VARIABLE TIMEPERIODS = "[[SYSTEM,SGPForecastPeriod,DBDEFAULT]]" Set VARIABLE TIMEPERIODS = ListAppend(TIMEPERIODS, "[[SYSTEM,SGPBudgetPeriod,DBDEFAULT]]")

Example: Specify temporary symbols mixed with real symbols

If Not(VariableExists("TIMEPERIODS"))

    Create VARIABLE TIMEPERIODS AS RANGE

END If

Set VARIABLE TIMEPERIODS = "[[SYSTEM,SGPForecastPeriod,DBDEFAULT]]"

Set VARIABLE TIMEPERIODS = ListAppend(TIMEPERIODS, DIFF")

Set VARIABLE TIMEPERIODS = ListAppend(TIMEPERIODS, "[[SYSTEM,SGPBudgetPeriod,DBDEFAULT]]")

To capture additional user input via a form, it is required that the button clicked be copied to the FORM_ButtonClicked variable to ensure expected app execution. Specifically, app execution continues if FORM_ButtonClicked has a value of “OK”.

Example: Capture additional user input via a form

Show FORM USING Custom.lvfrm

Set VARIABLE FORM_ButtonClicked = $LVS_BUTTONCLICKED$

Allowing currency re-selection in a data view input app

There may be cases where the initial selection in the app is based on the functional currency of the selected entity, but you want the user to be able to change the currency.

To accomplish this, follow these steps:

Note: Substitute CURRENCY for the name of your currency dimension, or use an attribute token or $CORE.DimensionInfo.KeyDimensionList[4]$ for CURRENCY for flexibility.

  1. In the pre-selection add the following to support currency selection:

    //Configure currency selections for re-select in view

    Create GLOBALVARIABLE CURRENCYDefault AS STRING

    Create GLOBALVARIABLE CURRENCYOptions AS STRING

    Create GLOBALVARIABLE CURRENCYSymbols AS RANGE

    Create GLOBALVARIABLE oldSelectDimensionList[] AS STRING //used to restore symbol selection to original options

     

    Set VARIABLE CURRENCYOptions = "11000"

    Set VARIABLE CURRENCYSymbols = "SOURCEC###"

     

    Create VARIABLE isCurrencySelection AS NUM //used to track in post-selection if the is changing currency only

  2. In the Post-Selection add logic to set the native currency on entity selection:

    If Not(VariableExists("CURRENCY"))

        Create VARIABLE CURRENCY AS STRING

    END If

     

    If $isCurrencySelection$ //reset selection options to allow regular symbol selections

        Set VARIABLE FORM_SelectDimensionList = ListAppend(CORE_EmptyList, oldSelectDimensionList)

        Set VARIABLE isCurrencySelection = 0

    Else

        Set VARIABLE CURRENCY = "[[SYMBOL,ZGPNativeCurrency,$ENTITIES$]]" //apply currency of selected entity

    END If

  3. Add a View Action to allow the user to change currency (this will be a new button on the toolbar)

    Set VARIABLE oldSelectDimensionList = ListAppend(CORE_EmptyList, FORM_SelectDimensionList)

    Set VARIABLE isCurrencySelection = 1

     

    Set VARIABLE FORM_SelectDimensionList = ListAppend(CORE_EmptyList, "CURRENCY")

     

    Run PROCEDURE "VIEW\OnReselect.lvpro"

Specifying the data area definition

Use Data Area Definitions to specify the data areas to be used in the data input view. For each data area definition to be created, right-click on Data Area Definitions and select New Document.

Note: Only data areas that contain numeric data are supported for attribute-based reports.

  1. In the Data Area table, complete the following fields for each dimension:

    Note: The Spec and Level fields are not applicable if a symbol contains a variable.

    Field Notes

    Symbols

    Type a symbol name. Alternatively, you can use the symbol selector.

    To add more than one symbol for a dimension, select a row containing the dimension for which you want to add another symbol and click Symbol.

    To move a symbol up or down within a dimension, click Move Up or Move Down.

    Note: To use the symbol selected by the user or defined by an attribute, enter the name of the dimension as a variable, for example
    $ENTITIES$

    Spec

    Indicate the symbol specification using one of the following values:

    • All: Includes all symbols within the selected symbol’s hierarchy.
    • Leaf: Includes only leaf symbols within the selected symbol’s hierarchy.
    • Parent: Includes only parent symbols within the selected symbol’s hierarchy.
    • Root and Parent: Includes only root and parent symbols within the selected symbol’s hierarchy.

    Note: To use the symbol selected by the user or defined by an attribute, enter the name of the dimension as a variable, for example
    $ENTITIES$

    Level

    Specify the number of levels down from the symbol to be included in the data area.

  2. Use Additional Configuration to specify any other Data Area Definition features you wish to use. Additional Configuration is a code editor that allows you to enter data area definition functions to be included in the data area. For more information on the code editor, see Using the code editor.

    Typical use of Additional Configuration in a data area definition would be to:

    • Add an attribute filter using the AttributeFilter function
    • Add a schedule to the using the Schedule function
    • Add a temporary symbol using the TempSym function
    • Override the query type specified in Settings using the AdjustedDetail function

Published:

Creating Attribute-Based Report Apps

You can use attribute-based report apps to analyze your Longview data based on defined attribute values.

Specifying overall settings

You can specify overall display and formatting options for the report.

Display options:

Field Notes

Display dimensions

Select the dimensions that you would like to display in the attribute-based report.

Note: The Display Dimension cannot be a Dimension corresponding to values.

Output

Select the way you would like to view your display dimensions:

  • Name: A single column for each Display dimension will be visible showing the symbols name
  • Description: A single column for each Display dimension will be visible showing the symbols description.
  • Name and Description: Two columns for each display dimension will be visible - one displaying the symbols name and the other displaying the symbols description.

Values options:

Field Notes

Dimension corresponding to values

Specify the dimension for which you would like to see the values.

Note: The Dimension corresponding to values cannot be a Display Dimension.

Output

Select the way the column header(s) will display for a values dimension:

  • Name: A single column for each Display dimension will be visible showing the symbols name
  • Description: A single column for each Display dimension will be visible showing the symbols description.
  • Name and Description: Two columns for each display dimension will be visible - one displaying the symbols name and the other displaying the symbols description.

Data type

Select ADJUSTED to query adjusted data (unadjusted + journal entries) or UNADJUSTED to query data excluding journal entries

Number formatting:

Field Notes

Default decimals

Enter the number of decimals to display for each numeric value. Generally this should be from 0 to 9.

Use parentheses for negative numbers

Select Yes to display negative numbers with parentheses.

Select No to display negative numbers with a negative sign

Use thousands separator for numbers

Select Yes to display a locale-specific thousands separator based on the operating system setting.

Select No to not display a thousands separator.

Specifying attribute columns

Use the Attribute Columns to add attributes you would like to analyze to your attribute-based report.

To add an attribute column

  1. Right-click on attribute Columns and select Add Attribute.
  2. Fill in the following fields:
    1. Attribute: Select the symbol attribute you would like to display in the report.

    2. Description: Specify the description that will display as the column header for the attribute column.

    3. Source dimension: Specify the source dimension the symbol attribute data is based on.

Specifying pre-selection commands

Use pre-selection to perform any commands before symbol selection. The typical use of pre-selection is to perform advanced logic to determine default selections or set the range of possible symbols. Pre-selection commands are executed after symbol selection settings are applied from the app configuration, so all symbol selection variables have been created at this point.

See Generating a symbol selection form for details on symbol selection variables.

Note: Using pre-select commands to set default or symbols overrides the settings in User Selections.

Variable Notes

<Dimension>Default

Specify the default selection in the symbol selector, for the Dimension.

<Dimension>Symbols

Specify the list of available selections in the symbol selector for the Dimension.

Example: Setting the list of possible symbols to all YTD periods

Create VARIABLE ytdPeriodList AS RANGE

Set VARIABLE ytdPeriodList = "[[SYSTEM,SGPTimePeriodsYTD,DBDEFAULT]]"

For EACH ytdPeriod in ytdPeriodList

    Set VARIABLE TIMEPERIODSSymbols = ListAppend(TIMEPERIODSSymbols, "$ytdPeriod$#99")

Next

Specifying user selections

Use user selections to specify dimensions for which the user will be prompted to choose symbol(s). For each dimension that the user will choose symbols, right-click on the User Selections folder and choose Add Dimension. The dimension settings page will appear.

Variable Notes

Dimension

Select the dimension the user will be prompted to select symbol(s) for.

Available selections

Select a symbol to limit the possible symbols available to the user. If left blank the user will be able to select from all symbols available in the dimension. The available symbols will always be limited by user access.

Default selection

Select a symbol to specify as the default selection. This can either be a database symbol, an attribute symbol, or a floating time period.

Note: Attribute symbols and floating time periods will only be available if they are defined in your system.
For more information, see “Specifying attributes in Longview Application Administrator” in the Longview Analysis and Reporting Guide.

Selection required

Check this to force the user to select a symbol to continue.

Allow leaf selection

Check this to allow the user to select a leaf symbol.

Allow parent selection

Check this to allow the user to select a parent symbol.

Allow read-only selection

Check this to allow the user to select a read-only symbol.

Allow multiple selections

Check this to allow the user to select more than one symbol.

Attribute filter

Enter an attribute filter expression to further limit the possible symbol selections.
For more information see SymbolSelector in the Longview Developer’s Guide.

Specifying attribute-based selections

Use Attribute Based Selections to specify selections for dimensions that are deter- mined by an attribute value. For each dimension to be determined via an attribute, right-click on Attribute Based Selections and select Add Dimension.

Variable Notes

Dimension

Select the dimension to select symbol(s) using an attribute value.

Attribute class

Select the class of attribute to use.

Attribute name

Select the attribute.

Source dimension (SYMBOL class)

If the attribute class is SYMBOL, select the source dimension.

Note: The source dimension must be a dimension specified as a user selection or attribute-based selection.

Note: The variable created to hold the attribute-based symbol will have the same name as the dimension. The variable created will be a STRING type.

Example, to set the currency selection to be the functional currency of the selected entity:

  1. Select the CURRENCIES dimension.
  2. Set the attribute class to SYMBOL.
  3. Enter “ZGPNativeCurrency” for the attribute name.
  4. Select ENTITIES for the source dimension.

Example, to set the time period selection to be the current period:

  1. Select the TIMEPERIODS dimension.
  2. Set the attribute class to SYSTEM.
  3. Enter “SGPCurrentPeriod” for the attribute name.

Specifying post-selection commands

Use post-selection to perform any commands after symbol selection, but before any data areas are created. The typical use of post-selection commands is to perform advanced symbol selection tasks. For example, you might use post-selection to create a list of all standard intercompany accounts. In addition, you may want to use a form to further refine selection, or instead of the template provided symbol selection.

Caution: Post-selection commands are executed as part of symbol selection within a view. Any Create VARIABLE commands will cause an error during symbol reselection. If “Allow user to change selections in view” is allowed, either create variables only in pre-selection, or wrap variable creation in VariableExists checks.

Example: Get a list of all standard intercompany accounts

If Not(VariableExists("ACCOUNTS"))

    Create VARIABLE ACCOUNTS AS RANGE

END If

 

Set VARIABLE ACCOUNTS = CreateList(SYMBOLS, DATABASE, ACCOUNTS, "TB###")

Set VARIABLE ACCOUNTS = FilterList(ACCOUNTS, "[[SYMBOL,ZElimICSchTransactions,THIS]] == 'ICStandard'")

Example: Specifying multiple attribute time periods (current forecast and budget period)

If Not(VariableExists("TIMEPERIODS"))

    Create VARIABLE TIMEPERIODS AS RANGE

END If

Set VARIABLE TIMEPERIODS = "[[SYSTEM,SGPForecastPeriod,DBDEFAULT]]" Set VARIABLE TIMEPERIODS = ListAppend(TIMEPERIODS, "[[SYSTEM,SGPBudgetPeriod,DBDEFAULT]]")

Example: Specify temporary symbols mixed with real symbols

If Not(VariableExists("TIMEPERIODS"))

    Create VARIABLE TIMEPERIODS AS RANGE

END If

Set VARIABLE TIMEPERIODS = "[[SYSTEM,SGPForecastPeriod,DBDEFAULT]]"

Set VARIABLE TIMEPERIODS = ListAppend(TIMEPERIODS, DIFF")

Set VARIABLE TIMEPERIODS = ListAppend(TIMEPERIODS, "[[SYSTEM,SGPBudgetPeriod,DBDEFAULT]]")

To capture additional user input via a form, it is required that the button clicked be copied to the FORM_ButtonClicked variable to ensure expected app execution. Specifically, app execution continues if FORM_ButtonClicked has a value of “OK”.

Example: Capture additional user input via a form

Show FORM USING Custom.lvfrm

Set VARIABLE FORM_ButtonClicked = $LVS_BUTTONCLICKED$

Allowing currency re-selection in a data view input app

There may be cases where the initial selection in the app is based on the functional currency of the selected entity, but you want the user to be able to change the currency.

To accomplish this, follow these steps:

Note: Substitute CURRENCY for the name of your currency dimension, or use an attribute token or $CORE.DimensionInfo.KeyDimensionList[4]$ for CURRENCY for flexibility.

  1. In the pre-selection add the following to support currency selection:

    //Configure currency selections for re-select in view

    Create GLOBALVARIABLE CURRENCYDefault AS STRING

    Create GLOBALVARIABLE CURRENCYOptions AS STRING

    Create GLOBALVARIABLE CURRENCYSymbols AS RANGE

    Create GLOBALVARIABLE oldSelectDimensionList[] AS STRING //used to restore symbol selection to original options

     

    Set VARIABLE CURRENCYOptions = "11000"

    Set VARIABLE CURRENCYSymbols = "SOURCEC###"

     

    Create VARIABLE isCurrencySelection AS NUM //used to track in post-selection if the is changing currency only

  2. In the Post-Selection add logic to set the native currency on entity selection:

    If Not(VariableExists("CURRENCY"))

        Create VARIABLE CURRENCY AS STRING

    END If

     

    If $isCurrencySelection$ //reset selection options to allow regular symbol selections

        Set VARIABLE FORM_SelectDimensionList = ListAppend(CORE_EmptyList, oldSelectDimensionList)

        Set VARIABLE isCurrencySelection = 0

    Else

        Set VARIABLE CURRENCY = "[[SYMBOL,ZGPNativeCurrency,$ENTITIES$]]" //apply currency of selected entity

    END If

  3. Add a View Action to allow the user to change currency (this will be a new button on the toolbar)

    Set VARIABLE oldSelectDimensionList = ListAppend(CORE_EmptyList, FORM_SelectDimensionList)

    Set VARIABLE isCurrencySelection = 1

     

    Set VARIABLE FORM_SelectDimensionList = ListAppend(CORE_EmptyList, "CURRENCY")

     

    Run PROCEDURE "VIEW\OnReselect.lvpro"

Specifying the data area definition

Use Data Area Definitions to specify the data areas to be used in the data input view. For each data area definition to be created, right-click on Data Area Definitions and select New Document.

Note: Only data areas that contain numeric data are supported for attribute-based reports.

  1. In the Data Area table, complete the following fields for each dimension:

    Note: The Spec and Level fields are not applicable if a symbol contains a variable.

    Field Notes

    Symbols

    Type a symbol name. Alternatively, you can use the symbol selector.

    To add more than one symbol for a dimension, select a row containing the dimension for which you want to add another symbol and click Symbol.

    To move a symbol up or down within a dimension, click Move Up or Move Down.

    Note: To use the symbol selected by the user or defined by an attribute, enter the name of the dimension as a variable, for example
    $ENTITIES$

    Spec

    Indicate the symbol specification using one of the following values:

    • All: Includes all symbols within the selected symbol’s hierarchy.
    • Leaf: Includes only leaf symbols within the selected symbol’s hierarchy.
    • Parent: Includes only parent symbols within the selected symbol’s hierarchy.
    • Root and Parent: Includes only root and parent symbols within the selected symbol’s hierarchy.

    Note: To use the symbol selected by the user or defined by an attribute, enter the name of the dimension as a variable, for example
    $ENTITIES$

    Level

    Specify the number of levels down from the symbol to be included in the data area.

  2. Use Additional Configuration to specify any other Data Area Definition features you wish to use. Additional Configuration is a code editor that allows you to enter data area definition functions to be included in the data area. For more information on the code editor, see Using the code editor.

    Typical use of Additional Configuration in a data area definition would be to:

    • Add an attribute filter using the AttributeFilter function
    • Add a schedule to the using the Schedule function
    • Add a temporary symbol using the TempSym function
    • Override the query type specified in Settings using the AdjustedDetail function

For an optimal Community experience, Please view on Desktop