In the Advanced Options section on a Workbench Report, you can work with custom templates in the following ways:
- Use the default template configured and customized by your Admin, which includes custom styling according to your business needs.
- Download a sample template: When creating a new report, you must first save the report to access the Sample action. Select Sample to download the sample template for the Workbench Report. This file allows you to familiarize yourself with report tokens and how Workbench uses these tokens to insert data on reports. You can also edit this file and apply formatting using all of Excel’s functionality.
- Upload a customized Excel template: When creating a new report, you must first save the report to access the Upload action. Select Upload to upload a customized Excel template file that defines the structure of the Workbench Report data. The Excel template overrides the Workbench Report layout, including any grouping.
In addition to custom templates, you can download and use standard aggregate report templates for Workbench Reports.
While Excel has certain limitations when displaying data, Workbench can exceed these restrictions and you can employ certain workarounds.
Download a Sample Report File
To download the sample file of the Workbench Report, see Using Excel Report Templates. Vault generates a sample Excel template and names the file after the report.
Vault disables the Sample button if no fields (columns) have been added to the Workbench Report layout.
The Excel file contains the following worksheets:
Vault updates a report’s sample template each time you make changes to the report. You can download the sample template and customize it however you like. A few examples include:
- Moving data between worksheets
- Adding custom worksheets
- Renaming columns
- Including headers and footers
- Updating page orientation, size, and margins
- Applying conditional formatting
- Applying cell formatting, such as bolding and background colors
However, you should not change the tokens in the sample template. Changing the tokens will prevent Vault from correctly populating the report template. If you accidentally make unwanted changes to the sample template, you can always download it again.
Coverpage
The first worksheet in the sample Excel template, and all Workbench Reports created without a template, is named Coverpage and includes the following report tokens:
| Report Parameter Token | Description |
|---|---|
${reportName} |
Name of the report |
${runDataUpdatedDateTime} |
Data transfer from Safety to Safety Workbench occurs daily. This field defines the cut-off day and time for the transfer of reported safety data. |
${runDateTime} |
Date and time the report was last run |
${exportedByUsername} |
Email of the user exporting the report |
${reportName} |
Name of the report |
${meddraVersion} |
Active MedDRA version at the time of the data sync from Safety |
${vaultName} |
Name of the Vault |
${domainName} |
Name of the domain |
${reportTimezone} |
Timezone specified on the Workbench Report. All date and time values on the report output adhere to this timezone. If this field is blank, date and time values adhere to the Vault timezone of the user who ran the Workbench Report. |
${sortOrder} |
Sorting logic used by the report. When only the Sort menu is used to sort the Workbench Report data, this token returns data for the menu. If the report data is also grouped, this token returns data for the Sort groups by drop-down. When the Follow View Sort Order checkbox is selected, the token returns Follow View Sort Order. |
${documentSensitivity} |
Classification of data sensitivity |
${caseVersioning} |
Case versions returned in the results, which includes:
|
${reportCaseSeries} |
Name of the Workbench Case Series used to filter this report, if applicable. |
${reportSignalSeries} |
Name of the Signal Case Series used to filter this report, if applicable. Your Vault must be licensed for Veeva Safety Signal to use Signal Case Series. |
If the Workbench Report contains filters, the Coverpage worksheet also includes the following filter tokens:
| Filter Parameter Token | Description |
|---|---|
${filter.view} |
Name of the safety view |
${filter.advanced_logic_number} |
Advanced logic number assigned to this filter |
${filter.field} |
Field identifier of the filter |
${filter.operator} |
Operator (like equals or is in the range) selected in the filter field |
${filter.value} |
Value entered in the filter field |
${advancedLogic} |
Advanced logic of the current report |
${parameter.field} |
Name of the criteria field (configured Workbench View Parameters) on the safety view |
${parameter.value} |
Criteria value entered by the user on the Workbench Report |
The Excel file displays one filter per row. For Vault to export these filter parameter token values successfully, ensure you adhere to the Excel template coverpage restrictions.
If you selected Show Grand Total in the report’s Layout section, the Coverpage worksheet includes the ${format} Grand Total token. Custom formatting you apply to this cell will apply to the Grand Total row in the exported report, for example, bolding, background colors, styling, and alignment.
The following image represents an example of a sample file’s Coverpage worksheet:
Coverpage Restrictions
For Vault to export the token values successfully, consider the following restrictions:
- The following filter tokens must be in the same row in the uploaded Excel template:
${filter.view}${filter.advanced_logic_number}${filter.field},${filter.operator}${filter.value}
- The following criteria tokens must be in the same row in the uploaded Excel template:
${parameter.field}${parameter.value}
- The filter tokens and criteria tokens cannot be in the same row in the uploaded Excel template.
Export
The second worksheet in the Excel template is named Export. Each heading in the Excel template corresponds to a field (column), either the name of the field or an alias specified by a user, in the Workbench Report layout.
The following image represents an example of a sample file’s Export worksheet:
When a user runs and downloads the report in Excel format, Vault uses the tokens on the Coverpage and Export worksheets to insert the specified data into each applicable cell.
Vault allows you to use column tokens and named ranges in Excel templates. For more information about named ranges, see Microsoft’s Create a Named Range in Excel.
Note: Vault does not support column tokens in merged cells.
Optionally, you can update the Export template and upload it to the Workbench Report.
Optional Tokens
Excel templates support additional tokens to capture any criteria filter values on the Workbench Report. These tokens are not part of the sample Excel template, but you can optionally add them:
| Report Parameter Token | Description |
|---|---|
${parameter.value.<parameter api name>} |
A specific criteria’s value entered by the user on the Workbench Report. Specify which criteria by replacing <parameter api name> with its API name. |
${parameter.value.<parameter api name>.hideColumnIfEmpty} |
A variation of the specific criteria value token. If the user did not enter a criteria value on the Workbench Report, Vault skips the token and its entire Excel column when creating the final Excel output. We do not recommend including this token in Excel formulas, merged cells, or conditional formatting. |
${parameter.value.<parameter api name>.start} |
For a specific Date or DateTime range, the criteria’s start date value entered by the user on the Workbench Report. Specify which date range criteria by replacing <parameter api name> with its API name. |
${parameter.value.<parameter api name>.end} |
For a specific Date and DateTime range, the criteria’s end date value entered by the user on the Workbench Report. Specify which date range criteria by replacing <parameter api name> with its API name. |
Upload a Customized Template File
An Excel template overrides the Workbench Report layout, including any grouping. Once you create a template and upload it to a Workbench Report in your Vault, Vault uses the uploaded template to organize the report data and saves it as an Excel file with the same file name as the template. If the Workbench Report is downloaded in CSV format, Vault uses the tabular structure defined in the Workbench Report layout.
To upload a customized template file to the Workbench Report, see Using Excel Report Templates. If the Excel template contains custom formatting, Vault retains this formatting in the generated report output.
You can upload a reformatted sample file or a new Excel template file. You can upload a sample file to a different Workbench Report if the report from which you downloaded the file has similar columns.
When uploading a template file, consider the limitations in Using Excel Report Templates and the following additional restrictions:
- Vault replaces the following restricted characters with a dash (-):
<>:"/|?* - Vault truncates file names to 197 characters.
Note: Ensure the template file you upload does not contain any errors. Vault does not perform any additional verification and accepts any layout overrides that occur.
After uploading a template file, you can select the Actions menu beside it to perform additional actions such as:
- Upload and Replace: Select this option to replace the current template file.
- Download: Select this option to download the current template file. If the Workbench Report contains unsaved changes, you must first save the report to download it.
- Delete: Select this option to delete the current template file from the Workbench Report.
Excel Limitations & Workarounds
Excel sets the row height for cells with less than 409 points and, by default, cuts off data exceeding this limit. To prevent truncation, Workbench can override this limit by adjusting the row height based on the tallest cell in the row (containing the most lines), if the cell is not merged.
While Workbench can override the Excel height restriction, cells cannot exceed the page height. If Excel is truncating your data, consider the following approaches:
- Organize cell data so that priority information appears at the top
- Expand the column width
- Reduce the font size
- Reduce page margins
- Change the page size
Note: When you interact with any cell in a row where the height is greater than Excel’s limit (409 points), Excel reduces that row’s height. You cannot adjust or undo the height change; you must quit Excel without saving, or re-download the report from Workbench in Excel format.