# About Document Relationship Reports

This article covers advanced setup for **Document Relationship** reports, which includes the following:

  * **Copy with Original**
  * **Original with Copy**
  * **Other Source Document with Target Document**
  * **Other Target Document with Source Document**
  * **Supported Document with Supporting Document**
  * **Supporting Document with Supported Document**

Unlike other report types, **Document Relationship** reports include default filters for your data. Under these filters, relationship reports actually use two report types (reporting object configurations): _Source Document with Target Document_ and _Target Document with Source Document_. By editing the default filters and aliases, you can use the standard relationship report types to report on many other relationships. For example, you could use a _Supporting Document with Supported Document_ report type to report on the _Related Pieces_ relationship. See [example setups][0] below.



<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>: Sometimes, you can answer the same question for an individual document from the <a href="/en/lr/1963/#relationship-reporting">Where Used view</a>.</p>
    </div>
  </div>
</div>



## Relationship Type Filter

When you create a report using any of the document relationship report types, Vault automatically adds a _Relationship > Type_ filter to the new report. By default, this filter matches the report type that you selected: _Based On_ relationship for _Copy with Original_ and _Original with Copy_ or _Supporting Documents_ relationship for _Supporting Document with Supported Document_ and _Supported Document with Supporting Document_. You must manually select a relationship type for _Other Source Document with Target Document_ and _Other Target Document with Source Document_.

If you need to report on a different relationship type, you can modify the default filter. Keep in mind that updating the filter does not change the underlying reporting object structure, i.e., whether source document or target document is the primary reporting object. You'll need to start from a report type that has the reporting structure you need. For example, in the _Based On_ relationship, _Copy_ is the source document and _Original_ is the target document, so in _Copy with Original_, the copy/source document is the primary reporting object and in _Original with Copy_, the original/target document is the primary reporting object.

In the _Relationship > Type_ filter list, you'll only see document relationship types  for which the source document is not [version-specific](/en/lr/21330/#configuration-elements-for-document-relationships).

## Comparing Fields

Document relationship reports provide the ability to add filters that compare values between the source and target documents using different operators. When a field is chosen as a filter, the conditions contain options under the _Another Field_ category. This filtering is available for Number, Status, Date and Datetime fields, though the available operators may vary depending upon the type of field.

<a href="https://platform.veevavault.help/assets/images/VS-29210 Image 1.png" data-lightbox="images" data-title="" data-alt="Another Field comparison category">
  <img class="docimage" src="https://platform.veevavault.help/assets/images/VS-29210 Image 1.png" alt="Another Field comparison category" style="max-width: 500px;"  />
</a>

For example, users can report on relationships where the Source and Target documents have different values for a given field:

<a href="https://platform.veevavault.help/assets/images/VS-29210 Image 2.png" data-lightbox="images" data-title="" data-alt="Field comparison filter">
  <img class="docimage" src="https://platform.veevavault.help/assets/images/VS-29210 Image 2.png" alt="Field comparison filter" style="max-width: 500px;"  />
</a>

## Version-Specific Document Relationship Reports

In document relationship reports, the primary reporting object always shows the latest document version, regardless of when the document relationship was created. The secondary reporting object honors version specificity for document relationships that are version-specific. For example, if your source document is version-specific, the target document should be the primary reporting object.

## Document Aliases

The **Alias** fields help you to understand the context for fields and filters in your report. For example, when adding a report filter, the list of fields includes fields for the source document and for the target document. Rather than showing "source" and "target" headings for these, Vault uses the alias values (Copy and Original, etc.) as the headings.

<a href="https://platform.veevavault.help/assets/images/Report_Filters.png" data-lightbox="Report_Filters.png" data-title="" data-alt="Report Filters">
  <img class="docimage" src="https://platform.veevavault.help/assets/images/Report_Filters.png" alt="Report Filters" style="max-width: 500px;"  />
</a>

The aliases also appear as column headers for each reporting object.

<a href="https://platform.veevavault.help/assets/images/Copy_with_Original_Report.png" data-lightbox="Copy_with_Original_Report.png" data-title="" data-alt="Copy with Original Report">
  <img class="docimage" src="https://platform.veevavault.help/assets/images/Copy_with_Original_Report.png" alt="Copy with Original Report" style="max-width: 500px;"  />
</a>

Aliases are set automatically for document relationship reports, but you can update the values after selecting a report type for a new report. Note that alias values (like report types) are only editable during the first step of report creation; you cannot update these later.

<a href="https://platform.veevavault.help/assets/images/Report_Aliases.png" data-lightbox="Report_Aliases.png" data-title="" data-alt="Report Aliases">
  <img class="docimage" src="https://platform.veevavault.help/assets/images/Report_Aliases.png" alt="Report Aliases" style="max-width: 500px;"  />
</a>

## Example Setups {#example_setups}

### Global Document Reuse Report

This example explains how specific report settings need to be set in order to create a report that shows global documents with their country-specific copies.

  * Report Type: Original with Copy
  * Report Format: Tabular
  * Original Alias: Global Document
  * Copy Alias: Local Document
  * Filters:
      * _Relationship > Type_ equals _Based On_ (default filter)
      * _Global Document_ has at least one _Local Document_ (default filter)
      * _Global Document > Country_ equals _Global_
      * _Local Document > Country_ does not equal _Global_

### Related Pieces by Document Report

This example explains how specific report settings need to be set in order to create a report that shows promotional pieces with their related pieces.

  * Report Type: Supported Document with Supporting Document
  * Supporting Document Alias: Related Piece
  * Supported Document Alias: Promotional Piece
  * Filters:
      * _Relationship > Type_ equals _Related Pieces_ (default filter requires update)
      * _Promotional Piece_ has at least one _Related Piece_ (default filter)

### Linked Document Relationship Report

This example explains how specific report settings need to be set in order to create a report that shows educational pieces with their linked reference documents.

  * Report Type: Other Target Document with Source Document
  * Target Document Alias: Educational Document
  * Source Document Alias: Reference Document
  * Filters:
      * _Relationship > Type_ equals _Linked Documents_ (user must manually select the relationship type)
      * _Source Document_ has at least one _Target Document_ (default filter)

 [0]: #example_setups