# Generate & Run Report Sets

Users can reuse _Workbench Report Set Definitions_ to create _Workbench Report Sets_, which group multiple <a href="/en/lr/752963/">_Workbench Reports_</a> that have a common purpose (for example, PADER aggregate reports). The following capabilities are available for _Workbench Report Sets_:
* [Generate][4] _Workbench Report Sets_ and child _Workbench Reports_ from _Workbench Report Set Definitions_
* [Run][3] _Workbench Reports_ simultaneously from _Workbench Report Sets_
* Automatically generate _Workbench Reports_ and their associated documents on a recurring schedule by:
    * [Configuring a schedule][6] on the _Workbench Report Set_
    * [Using the SafetyDocs PVA Scheduler][5], provided you have a <a href="/en/lr/01233/">Veeva SafetyDocs license</a>

 <div class="note-border alert-info">
  <div class="alert alert-info" role="alert">
    <div><i class="far fa-info-circle"></i></div>
    <div class="alert-text">
      <p><strong>Note</strong>: If you have a <a href="/en/lr/01233/">Veeva SafetyDocs license</a>, Vault may be able to automatically generate and distribute <em>Workbench Report Set</em> documents to a specified contact via <a href="/en/lr/659185/">email</a> or <a href="/en/lr/682078/">Vault task</a>.</p>
    </div>
  </div>
</div>



## Prerequisites

Consider the following prerequisites:
* Your Admin must <a href="/en/lr/1005776/">enable</a> and <a href="/en/lr/826869/">configure</a> reusable _Workbench Report Set Definitions_. 
* To cancel running _Workbench Reports_, your Admin must <a href="/en/lr/962214/">configure the action</a>.
* To schedule _Workbench Report Sets_, your Admin must <a href="/en/lr/884894/">enable Workbench Report Set Scheduling</a>.
* To export an entire report set into a single Excel file, your Admin must enable <a href="/en/lr/1005865/">Combined Excel Report for Report Sets</a>.

## Generate Report Sets {#generate}

The _Generate Report Set_ action on a _Workbench Report Set Definition_ generates a _Workbench Report Set_ and its child _Workbench Reports_. Vault creates the child reports using <a href="/en/lr/826869/">parameters</a> specified by your Admin.

To trigger this action: 
1. Navigate to **Workbench > Report Set Definitions > [Workbench Report Set Definition]**. 
2. From the **All Actions** menu of the _Workbench Report Set Definition_, select **Generate Report Set**. If you do not see this action, ensure there is at least one <a href="/en/lr/826869/#add-workbench-report-definitions">_Workbench Report Definition_</a>.
3. In the _Generate Report Set_ dialog, complete the following information: 
    * Enter a **Name** for the report set.
    * The filters and advanced logic you add apply to all _Workbench Reports_ in this report set. To add filters:
        1. In the _Filters_ section, select **Refresh**. You must select this button to load any additional filters from the associated <a href="/en/lr/752978/">safety views</a>.
        2. Depending on your Admin's configuration of the associated safety views:
            1. Enter values for the <a href="/en/lr/752968/#inherited-criteria-and-filters">criteria</a> fields in the _Criteria_ subsection.
            2. Enter values for all <a href="/en/lr/752968/#inherited-criteria-and-filters">required filters and for optional filters</a> as needed in the _Required_ and _Optional_ subsections, respectively.
        3. In the _Additional_ subsection, <a href="/en/lr/752968/#how-to-add-filters">add filters</a> and <a href="/en/lr/752968/#advanced-logic">advanced logic</a> as needed. Some fields require the use of <a href="/en/lr/936862/">_Dynamic Views_</a>. A _Workbench Report Set_ can reference up to ten _Dynamic Views_ for filters.
4. Select **Continue**.

**Results**

After you trigger the action, Vault does the following:
* Creates a _Workbench Report Set_ in the _Pending_ state. Navigate to **Workbench > Report Sets** to view the record.
* Creates child _Workbench Reports_ in the _Pending_ state according to the <a href="/en/lr/826869/">parameters</a> specified by your Admin. You can access the reports in the _Reports_ section of the _Workbench Report Set_; these reports do not appear in the _Workbench > Ad Hoc Reports_ tab.

To further modify the _Workbench Reports_, you must edit them directly or [run all reports][3]. See <a href="/en/lr/752963/">Manage Workbench Reports</a> to learn more about editing the _Properties_, _Filters_, and _Layout_ sections.

## Run all Reports

Before you can run reports, you must first [generate a _Workbench Report Set_][4].

After reviewing each individual _Workbench Report_, you can either run the reports <a href="/en/lr/752975/#run-workbench-reports">separately</a> or simultaneously from the _Workbench Report Set_. To run all the reports at once, from the **All Actions** menu of the _Workbench Report Set_, select **Run all Reports**. Vault executes this action asynchronously in the background.

After you trigger the action, Vault does the following:
* Ensures every report includes only the filters specified in the report set. If filters were added or edited on a report directly, the _Run all Reports_ action removes those filters and ensures all reports are using the report set's filters.
* Sends you a notification and an email with a link to the _Workbench Report Set_ once the action is complete. The notification and email also list any reports that failed to run.
* Moves the _Workbench Reports_ to the _In Progress_ state.

### Cancel Running Workbench Reports {#cancel-running-reports}

If configured by your Admin, you can cancel running _Workbench Reports_ in a _Workbench Report Set_ in the following ways:
* To cancel multiple reports at once:  
    1. Expand the **Reports** section of the _Workbench Report Set_.
    2. Select **Show in Tab**. 
    3. Follow the steps in <a href="/en/lr/33725/#select">Using Bulk Object Record Actions</a> to run the **Cancel Reports** bulk action on the selected reports, ensuring you select **Record Actions** as the action step.
* To cancel a single report: 
    1. Expand the **Reports** section of the _Workbench Report Set_. 
    2. From the **All Actions** menu of a _Workbench Report_, select **Cancel Report**. 
    3. Repeat the above steps for other reports in the section, if applicable.
    
## Schedule Workbench Report Sets {#schedule-workbench-report-sets}

Before you can schedule report generation, you must first [generate a _Workbench Report Set_][4]. As best practice, test your report set with the [_Run All Reports_][3] action before scheduling to resolve any errors that Vault may encounter.

To configure a schedule that allows a _Workbench Report Set_ to generate _Workbench Reports_ and their documents on a recurring schedule:
1. On the _Workbench Report Set_, select **Edit** and expand the **Scheduling** section.
2. In the _Schedule_ field, select **Yes**.
3. Complete the [applicable fields][7], then select **Save**.

<div class="note-border alert-info">
  <div class="alert alert-info" role="alert">
    <div><i class="far fa-info-circle"></i></div>
    <div class="alert-text">
      <p><strong>Note</strong>: You can stop and restart a <em>Workbench Report Set</em> schedule as needed. To stop a schedule, set the <em>Schedule</em> field value to <strong>No</strong>, then select <strong>Save</strong>. To restart a stopped schedule, set the <em>Schedule</em> field value to <strong>Yes</strong>, then select <strong>Save</strong>.</p>
    </div>
  </div>
</div>



### Scheduling Section Fields {#scheduling-section-fields}

The following fields may be available:

<table id="table-id">
  <thead>
    <tr>
      <th>Field</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><em>Run Report</em></td>
      <td>To define the cadence at which Vault runs the <em>Workbench Report Set</em>, select a <a href="/en/lr/827001/"><em>Schedule</em></a> from the drop-down or select the <strong>Advanced Search</strong> (<img class="inline" src="https://platform.veevavault.help/assets/images/saf-binoculars-icon.png" alt="binoculars-icon" style="" />) icon to use filters and refine your search.</td>
    </tr>
    <tr>
      <td><em>Repeat on day</em></td>
      <td><p>This field appears only when <em>Monthly</em> is selected in the <em>Run Report</em> field.</p>
            <p>Use the drop-down to select the day of the month on which you want the <em>Workbench Report Set</em> to run.</p></td>
    </tr>
    <tr>
      <td><em>Repeat on</em></td>
      <td><p>This field appears only when <em>Weekly</em> is selected in the <em>Run Reports</em> field.</p>
            <p>Select a checkbox for each day of the week on which you want the <em>Workbench Report Set</em> to run.</p></td>
    </tr>
    <tr>
      <td><em>Start Date</em></td>
      <td>To define when Vault should first run the selected <em>Schedule</em>, use the calendar to select the date or enter the date manually.</td>
    </tr>
  </tbody>
</table>

**Result**

Beginning on the date specified in the _Start Date_ field, Vault runs the scheduled _Workbench Report Set_ at 4:30 AM UTC. Vault repeats this run on every date thereafter, as indicated by the selected scheduling values. Whenever the schedule runs, Vault:
* [Runs all _Workbench Reports_ in the _Workbench Report Set_][3]
* Creates a _Workbench Report Set Activity_ on the _Workbench Report Set_ to track the scheduled execution
* <a href="/en/lr/827412/">Uploads</a> the generated Excel documents to your _Library_ as either a new minor version of an existing report or a new major version for a net-new report
* Creates a _Workbench Report Set Activity Document_ record on the _Workbench Report Set Activity_ for each schedule-generated report document

<div class="note-border alert-info">
  <div class="alert alert-info" role="alert">
    <div><i class="far fa-info-circle"></i></div>
    <div class="alert-text">
      <p><strong>Note</strong>: Depending on your Admin’s configuration and your <a href="/en/lr/7239/">notification preferences</a>, Vault can notify all <em>Viewers</em>, <em>Editors</em>, and <em>Owners</em> of the <em>Workbench Report Set</em> once the <em>Workbench Report Set</em> has finished its scheduled run.</p>
    </div>
  </div>
</div>



### Considerations

Consider the following before modifying a _Workbench Report Set_ with a schedule:
* When you <a href="/en/lr/32218/">copy</a> a _Workbench Report Set_, Vault does not copy any of its scheduling details, including any generated _Workbench Report Set Activities_ or _Workbench Report Set Activity Documents_. As such, after copying a _Workbench Report Set_, you must manually define its [_Scheduling_ field values][7].
* You cannot delete a _Workbench Report Set_ that contains any _Workbench Report Set Activities_.
* When you delete a _Workbench Report Set Activity_ that contains _Workbench Report Set Activity Documents_, Vault deletes the _Workbench Report Set Activity Document_ records, but does not delete the documents from the _Library_.

## Generate Reports Using SafetyDocs PVA Scheduling {#generate-reports-safetydocs-pva-scheduling}

You can use <a href="/en/lr/01242/#pva-scheduling">SafetyDocs PVA scheduling</a> to run a _Workbench Report Set_ on a recurring schedule, allowing Vault to routinely <a href="/en/lr/01242/#source-workbench-report-set-field">generate all _Workbench Reports_ and their associated documents</a> and enabling you to distribute these documents to partners via <a href="/en/lr/659185/">email</a> or <a href="/en/lr/682078/">Vault task</a>.

## Download Workbench Reports

To download all _Workbench Reports_ from the _Workbench Report Set_, select one (1) of the following actions from the **All Actions** menu:
* **Download All as CSV**
* **Download All as Excel**
* **Download All As Excel Workbook**

When downloading all as an Excel Workbook, Vault copies all sheets from the individual report templates. To ensure a clean output, using only one template with a cover page within the report set is recommended in this scenario. Vault determines the worksheet order (left to right) using the _Report Set Worksheet Index_ field according to the following rules:

* Primary sort: Reports are ordered by the lowest index number (starting at one).
* Tie-breaker: If index numbers match, reports are ordered alphabetically by name.
* Existing report sets: If a report set was created by reusing a <a href="/en/lr/826869/#report-set-definitions">report set definition</a>, index numbers may already be assigned.

When the action is complete, Vault sends you a notification and an email with a link to download the reports in ZIP format.

[1]: #add-workbench-report-definitions
[2]: #add-filters
[3]: #run-all-reports
[4]: #generate
[5]: #generate-reports-safetydocs-pva-scheduling
[6]: #schedule-workbench-report-sets
[7]: #scheduling-section-fields