Defining Data Grid Layouts
Layout functions define the way dimensions are displayed in the Data Grid. When you create a Data Grid, you must choose the dimensions that appear in the rows and columns, as well as the dimensions that are fixed or sliced. You can specify a dimension as either a row, column, fixed, or sliced; you cannot specify a dimension as more than one of these categories.
Columns
Use this function to define the dimensions displayed as columns in the data view. This function is mandatory in a Data View definition file.
Syntax:
Columns Dimension1, Dimension2, ...
where:
- Dimension1, Dimension2, etc, are the dimensions to display as columns. If you specify multiple dimensions, they are nested. The first dimension specified is the outermost dimension, and any other dimensions appear in order from outer to inner, with the last dimension being the innermost dimension.
Example:
Columns TIMEPER
Related functions
ColumnWidth
Use this function to specify the column width for the innermost dimension in the columns orientation and optionally wrap text in title cells. If you use the ColumnWidth function for any dimension other than the innermost across dimension, the width of columns remains unaltered.
Syntax:
ColumnWidth Dimension, WidthSpecification[, WrapTitle:ON|OFF]
where:
- Dimension is the name of the innermost dimension in the columns orientation to which the column width applies.
- WidthSpecification is one of the following:
Value Description FitToTitle
Automatically adjusts the width of each column individually to fit the text of the title cell for the specified dimension.
Width
Specifies the column width of the title cells in pixels for the specified dimension. If you specify Width as 0 or do not use the ColumnWidth function in your data view definition file, the default column width is 200 pixels.
- WrapTitle is optional and can be one of the following:
Value Description ON
Wraps title text to the next line in title cells, if necessary, in the specified dimension.
If both FitToTitle and WrapTitle are specified, WrapTitle behavior is not noticeable until users manually adjust the width of columns.
OFF
Specifies the column width of the title cells in pixels for the specified dimension. If you specify Width as 0 or do not use the ColumnWidth function in your data view definition file, the default column width is 200 pixels.
Note: WrapTitle applies to titles only, not data.
Example:
ColumnWidth Currency, FitToTitle
ColumnWidth Currency, 75, WrapTitle:ON
Related functions
Expand
Use this function to specify the initial expansion state of symbols in a Data Grid.
Note: If you want an expanded symbol to appear in the initial view of the Data Grid, you must expand all ancestors of that symbol.
Syntax:
Expand Dimension, Symbol, ExpansionLevel[, OuterDimension1Symbol1|OuterDimension1Symbol2, OuterDimension2Symbol1, ...]
where:
- Dimension is the dimension that contains the parent symbol you want to expand.
- Symbol is the parent symbol that you want to expand.
- ExpansionLevel is the number of levels to expand the parent symbol.
- OuterDimension1Symbol1 is the outer dimension symbol in which to expand the parent symbol. Separate symbols in the same outer dimension with a pipe ( | ). Separate symbols in different outer dimensions with a comma. Outer dimension symbols are optional. If you do not specify outer dimension symbols, all occurrences of the specified symbol are expanded.
Example:
Expand TIMEPER, PYr_Total, 2
Expand ACCOUNTS, Trialbal, 1, Toronto|Montreal|Halifax, TCAD
Fix
Use this function to specify the dimension and symbol in your data view that are fixed. Fixed dimensions are listed on the Fixed tab. You can have more than one fixed dimension; however, each dimension can have only one fixed symbol.
Syntax:
Fix Dimension, Symbol
where:
- Dimension is the dimension to fix.
- Symbol is the symbol to fix.
Syntax:
Fix CURRENCIES, CAD
Related functions
Hide
Use this function to hide specified symbols from a Data Grid. You may want to, for example, include a certain hierarchy in your Data Grid but not particular symbols within that hierarchy. The Hide function does not apply to Slice or Fix dimensions or to line item details.
Note: Data for hidden symbols is still affected by the DynamicModel and DynamicRollup functions.
Syntax:
Hide Dimension, Symbol[|Symbol2|...|SymbolN]
where:
- Dimension is the dimension that includes the symbols you want to hide.
- Symbol is the symbol to hide. Separate multiple symbols with a pipe ( | ).
Syntax:
Hide ENTITIES, Toronto
Hide ENTITIES, Toronto|Montreal|Ottawa
Include
Use this function to specify the symbols that are available in a Data Grid for the dimensions in the rows, columns, or slices. If you do not use this function for a dimension, all symbols in the underlying data area are included. You can specify multiple Include statements for a dimension. Symbols appear in the order of the statements.
Syntax:
Include Dimension, SymbolSpec [,ExpandLevels]
where:
- Dimension is the dimension that contains the symbol to include.
- SymbolSpec contains the name of the symbols with any valid hierarchical syntax.
- ExpandLevels is optional and specifies the number of levels to expand the symbol when the Data Grid opens. ExpandLevels can have a value from 1 to 99. The default value is 1.
Example:
Include ACCOUNTS, Net_FA#99
InsertSeparator
Use this function to insert a blank row or column in a Data Grid. For example, in the grid below, there is a blank row after Month End Balances.
Syntax:
InsertSeparator BLANK, Dimension, Symbol, Position[, Number[, Size]]
where:
- Dimension is the dimension that contains the symbol to insert a blank row or column before or after.
- Symbol is the symbol that you want to insert a blank row or column before or after.
Note: If you specify a symbol that is suppressed using the SymbolSuppress function and Apply Symbol Suppression is selected in the Options dialog, the separator is also suppressed.
- Position can be either BEFORE or AFTER.
- Number is the number of blank rows or columns to insert in the specified position. This parameter is optional. The default value for this parameter is 1.
- Size specifies the row height or column width in pixels. Use this parameter only if Number is specified. If Number is specified, this parameter is optional and has the following default values:
Value Description Rows
20 pixels
Columns
ColumnWidth specification
Note: If ColumnWidth is also not specified, the default is 200 pixels.
Example:
InsertSeparator BLANK, ACCOUNTS, Month_End_Balances, AFTER, 1, 40
Instructions
Use this function to include the Instructions tab in a Data Grid. The Instructions tab appears below the Fixed tab on the right-most edge of a Data Grid. You can write your own custom instructions using HTML.
Note: Instructions do not support HTML5..
Syntax:
Instructions Option, FileName
where:
- Option can be one of the following:
Value Description ON
Includes the Instructions tab in the Data Grid. If you specify Instructions ON, you must include FileName.
OFF Hides the Instruction tab in the Data Grid. If you specify Instructions OFF, you do not need to include FileName.
This is the default if the Instructions function is not included in the Data View definition file.
- FileName is the name of the .html file to display. The path for this file must be relative to the applications folder on your Data Server. If you specify Instructions OFF, you do not need to specify FileName.
Example:
Instructions ON, SampleInstructions.html
The following is an example of the HTML code you could write for a custom instructions file:
Example:
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1250">
<title></title>
<style type="text/css">
body {color:#333333; font-family: Tahoma, Geneva, sans-serif; font-size: 11px; margin-top: 10px;}
ul {margin-left: 15px;}
</style>
</head>
<body>
<ul>
<li>Enter items in local currency</li>
<li>Do not enter decimals</li>
</ul>
<body>
</html>
LeftTitleText
Use this function to include additional information in the top left section of your Data Grid. Left title text appears just below slice dimensions or at the top of the Data Grid if you do not have slice dimensions. You can include attribute tokens and string variables in the text.
Syntax:
LeftTitleText "Text"
where:
- Text is the text to include, enclosed in double quotation marks. To include text on multiple lines, use \n as the line break character.
Note: If you use variables or attribute tokens in the LeftTitleText function, variables and attribute tokens are not updated with toolbar button actions.
Example:
LeftTitleText "Hello World\nThis is my left title text on two lines"
MessageBar
Use this function to add text and an icon in a highlighted message bar at the top of a Longview App.
Syntax:
MessageBar MessageType, "Message"
where:
- MessageType determines the icon to display and can be one of the following values:
- Error
- Information
- Warning
- None
- Message is the message to include on a single line only, enclosed in double quotation marks. If you include the MessageBar function in your Data View document but do not specify a message by using double quotation marks (""), the message bar does not display.
Note: If you use variables in MessageType or Message, variables are updated with toolbar button actions and the message bar is refreshed.
Example:
MessageBar Information, "Hello, Longview App User - don’t forget to enter data in your local currency!"
Rows
Use this function to define the dimensions displayed as rows in the Data Grid. This function is mandatory in a Data View definition file.
Syntax:
Rows Dimension1, Dimension2, ...
where:
- Dimension1, Dimension2, and so on, are the dimensions to display in the rows. If you specify multiple dimensions, they are nested. The first dimension specified is the outermost dimension, and any other dimensions appear in order from outer to inner, with the last dimension as the innermost dimension.
Example:
Rows ENTITIES, ACCOUNTS
Search
Use this function in your Data View definition file to customize the Data Grid Search box. You can use the Search function to specify the defaults for the Search options or to hide the Search box from a Data Grid. Unless you use this function to hide the Search box, it appears on the right-most edge of the toolbar of all Data Grids.
If the Search box is available in the Data Grid, Longview App users can modify the Search options within the Data Grid using the drop-down list. Longview App users cannot show or hide the Search box. Longview App users can use the Search box to search symbols only, including temporary symbols.
Note: If you have created a tabbed Data Grid, you can customize the Search box for each tab using the appropriate Data View definition file.
Syntax:
Search ON|OFF[, Order:OrderOption][, Expand:ExpandOption]
where:
- ON displays the Search box in the toolbar. This is the default if the Search function is not used in a Data View definition file.
- OFF hides the Search box in the toolbar.
- OrderOption can be one of the following
Value
Description DOWNACROSS
Searches the down dimension symbols first, then the across dimension symbols.
This is the default if Order is not specified.
ACROSSDOWN
Searches the across dimension symbols first, then the down dimension symbols.
- ExpandOption can be one of the following
Value
Description
ON
Expands hierarchies when the user navigates search results using the Next button. This is the default if Expand is not specified.
OFF
Maintains the expansion states of the Data Grid when the user navigates search results using the Next button.
Note: For more information on using the Search box in a Data Grid, see the “Longview Dashboard User’s Help”.
Syntax:
Search ON, Order:ACROSSDOWN, Expand:OFF
Slice
Use this function to specify the dimensions that are available in your Data Grid as slice dimensions. Slice dimensions are dimensions that users can change the symbol selection for using the Slice list in the top left corner of the Data Grid. For example, in the Data Grid below, the Slice lists contain Entities and Currency, and the TORONTO - Toronto Division and TCAD - Total Canadian Dollars symbols are the default selections.
Note: If you do not specify a particular dimension in the Rows or Columns statements in the Data View definition file, that dimension is automatically available as a Slice dimension.
Syntax:
Slice Dimension[, Symbol]
where:
- Dimension is the dimension to make available as a slice dimension. Slice dimensions appear in the Slice list in the order specified in the Data View document.
- Symbol is optional and specifies the default symbol selected for the dimension. If you do not specify a symbol, the first symbol in the Data Area for that dimension is selected.
Example:
Slice Entities, Toronto
SymbolWidth
Use this function to specify the column widths for specific symbols in the innermost dimension in the columns orientation and optionally wrap text in title cells. If you use the SymbolWidth function for any dimension other than the innermost across dimension, the width of columns remains unaltered.
Syntax:
SymbolWidth Dimension, SymbolSpec, WidthSpecification[, WrapTitle:ON|OFF]
where:
- Dimension is the name of the innermost dimension in the columns orientation that contains the symbol to which the width applies.
- SymbolSpec contains the name of the symbols to apply the width to, with any valid hierarchical syntax.
- WidthSpecification is one of the following:
Value Description FitToTitle
Automatically adjusts the width of each column individually to fit the text of the title cell for the specified symbol or symbols.
Width
Specifies the column width of the title cells in pixels for the specified symbol or symbols. If you specify Width as 0, the default column width is 200 pixels.
- WrapTitle is optional and can be one of the following:
Note: WrapTitle applies to titles only, not data.
Value Description ON
Wraps text to the next line in title cells, if necessary, in the specified dimension.
If both FitToTitle and WrapTitle are specified, WrapTitle behavior is not noticeable until users manually adjust the width of columns.
OFF
Does not wrap text to the next line in title cells. This is the default if WrapTitle is not specified.
If WrapTitle is OFF and the text in title cells is longer than the width of the title cell, the text is truncated.
Note: The SymbolWidth function applies only to the innermost across dimension; outer dimension symbol widths are dictated by the width of the innermost dimension symbols.
Example:
SymbolWidth Entities, CORPW#99, FitToTitle
SymbolWidth Entities, CORPW#99, 80, WrapTitle:ON
TitleWidth
Use this function to specify the width of titles for a dimension in the rows orientation and optionally wrap text in title cells.
Syntax:
TitleWidth Dimension, WidthSpecification[, WrapTitle:ON|OFF]
where:
- Dimension is the name of a dimension in the rows orientation to which the width of the title applies.
- WidthSpecification is one of the following:
Value Description FitToTitle
Automatically adjusts the width of the row title column to fit the widest title text for the specified dimension.
Width
Specifies the column width of the row title cells in pixels for the specified dimension. If you specify Width as 0 or do not use the TitleWidth function in your Data View definition file, the default column width is 200 pixels.
- WrapTitle is optional and can be one of the following:
Value Description ON
Wraps text to the next line in title cells, if necessary, in the specified dimension.
If both FitToTitle and WrapTitle are specified, WrapTitle behavior is not noticeable until users manually adjust the width of columns.
OFF
Does not wrap text to the next line in title cells. This is the default if WrapTitle is not specified.
If WrapTitle is OFF and the text in title cells is longer than the width of the title cell, the text is truncated.
Note: WrapTitle applies to titles only, not data.
Example:
TitleWidth Currency, FitToTitle
TitleWidth Accounts, 200, WrapTitle:ON