Use Transpose Detail and Transpose Summary in VDM to switch a Data Grid’s rows and columns. A transposed layout helps you compare records side by side while keeping the original View’s data.
What Is Transposing in VDM?
Transposing changes the orientation of a grid:
- Values from the first field in the dataset become column headers.
- The remaining field names become row labels.
- Values from each original record appear under its corresponding column header.
For example, if UserName is the first field, its values become the column headers. Fields such as Region and TotalSales appear as row labels.
The options are available for both Detail and Summary grids. Transposing changes the layout; it does not add a summary calculation.
Why Use Transpose?
Use a transposed layout when you want to:
- Compare values across records side by side.
- Display field names vertically for easier review.
- Present Detail or Summary results in a layout suited to your reporting needs.
- Switch between the regular and transposed layouts to inspect the same results.
Before You Begin
- Confirm that the View returns the data you want to display. To transpose Summary results, the View must have Summary data available.
- Check the field order. The first field supplies the values used as column headers.
- Check for NULL values in the fields used to create the transposed headers. These can cause a transposing error. See Troubleshooting below.
Video Tutorial
Step 1: Open and Run a View
Open the View in VDM and select Run View to load its results. Review the Detail or Summary grid you intend to transpose.
Step 2: Open View Options
Select the View Options tab on the ribbon at the top of VDM.
Step 3: Enable Transpose Options
Enable the option for the grid you want to transpose:
- Transpose Detail: Enables the transposed layout for Detail results.
- Transpose Summary: Enables the transposed layout for Summary results.
You can enable either option or both. These are View-level options; configure them separately for each View.
Step 4: Switch the Grid Layout
Open the dropdown for the desired Data Grid and select Transposed Mode. Select Regular Mode when you want to return to the standard layout.
If you want a different field’s values as the transposed column headers, move that field to the first position in the View’s field list and run the View again. If you use Advanced Query, place that field first in the query’s returned columns.
Example: Regular and Transposed Results
Regular Layout
In the regular layout, each row represents a returned record. Fields such as UserName, Region, and TotalSales appear as column headers.
Transposed Layout
When UserName is the first field, its values become column headers. The other field names, such as Region and TotalSales, appear as row labels, with each record’s values displayed beneath the corresponding header.
Verify the Results
- Confirm that the intended field’s values appear as column headers.
- Compare a record in Regular Mode with its corresponding column in Transposed Mode.
- Check that the row labels and values align correctly.
- If using Summary results, confirm that the underlying Summary calculations are correct before reviewing the transposed layout.
Troubleshooting
“ColumnName is required” Error
If a field used for transposing contains a NULL value, you may see:
Error transposing table: ColumnName is required when it is part of a DataTableCheck the first field and any other fields used to form the transposed headers. Filter out or exclude records with NULL values in the affected fields, then run the View again and retry Transposed Mode. Review which records will be excluded before changing the View’s filters.
Unexpected Column Headers
Check which field is first in the returned dataset. Move the intended header field to the first position, run the View again, and review the transposed results.
Transposed Mode Is Unavailable
Confirm that the corresponding Transpose Detail or Transpose Summary option is enabled under View Options for the current View. Also confirm that the selected grid has results available.
Save the View
After verifying the results, save the View to retain the View-level transpose settings. Reopen the saved View and confirm that the required options are enabled.
Comments
0 comments
Article is closed for comments.