Formatting Query Results
When you run a data, symbol, or attribute query using the Longview Add-In for Office, default Longview formatting is applied to the query results. You can make changes to the query results in the Microsoft Excel workbook. However, depending on the type of change that you make, you may invalidate the query. If a query is invalidated, it cannot be rerun. In the case of data queries, it also cannot be analyzed, reoriented, or drilled into.
Note: You can change formatting for data query results without invalidating the query by modifying the format options or the Longview cell styles applied to the query results. For more information, see Specifying format options for data queries and Formatting data query results using Longview cell styles.
The following changes do not invalidate a query:
- Any formatting (font, borders, or alignment for example).
- Inserting or deleting a row or column outside of the range of the query results
The following changes invalidate a query:
- Any manual change to the values of a cell in the range of the query results.
- Inserting or deleting a row or column in the range of the query results.
If you want to query data from the data from the data server repository and you want to include additional commentary, images, columns, or rows in your worksheet, Longview recommends that you use Longview Functions.
For more information, see Using Longview Functions.
Formatting data query results using Longview cell styles
When you run a data query, preconfigured Longview cell styles are automatically created and applied to the data query results. You can apply Longview cell styles (available on the Home tab, in the Styles group) to content in other Microsoft Excel workbooks. In addition, you can modify these cell styles as necessary, and merge them with any custom cell styles that you have created.
For more information on working with cell styles, see the Microsoft Excel Help.
The Longview cell styles are applied to the following sections of the data query results:
Note: In the following example, colored shading has been added to the data query results to better illustrate the separate sections. In addition, columns E to M have been hidden to display all relevant sections of the data query results.
# | Style name | Description | Additional notes |
---|---|---|---|
1 |
LV_FixedSymbol |
Fixed Symbols |
|
2 |
LV_QueryInfo |
Time Stamp |
|
3 |
LV_Title |
Report Title |
|
4 |
LV_Subtitle |
Report Subtitle |
|
5 |
LV_CHeader |
Column Name Headers |
|
6 |
LV_CHeaderLastRow |
Column Description Headers |
|
7 |
LV_DataDefault |
Data Default |
This cell style is applied to data that is not for a root symbol (total) or parent symbol (subtotal) in the data query. |
8 |
LV_CDataSubTotal |
Column Data Subtotals (Parents) |
|
9 |
LV_CDataTotal |
Column Data Totals (Roots) |
|
10 |
LV_RHeader |
Row Header Default |
This cell style is applied to child symbols, and any parent symbols that are at the level of symbol detail specified in the data query. |
11 |
LV_RHeaderSubTotal |
Row Header Subtotals (Parents) |
This cell style is applied to parent symbols that are not at the level of symbol detail specified in the data query. For example, if you set Level to 2 for a symbol in the Row dimension of your data query (2 levels of symbol detail below the selected symbol is included in the query), the cell style is applied to parent symbols at the first level of symbol detail, but not to parent symbols at the second level of symbol detail. |
12 |
LV_RHeaderTotal |
Row Header Totals (Roots) |
This cell style is applied to root symbols only. |
13 |
LV_RDataSubTotal |
Row Data Subtotals (Parents) |
This cell style is applied to parent symbols that are not at the level of symbol detail specified in the data query. For example, if you set Level to 2 for a symbol in the Row dimension of your data query (2 levels of symbol detail below the selected symbol is included in the query), the cell style is applied to parent symbols at the first level of symbol detail, but not to parent symbols at the second level of symbol detail. |
14 |
LV_RDataTotal |
Row Data Totals (Roots) |
This cell style is applied to root symbols only. |
Without the added shading, the data query results example appears as follows: