> For the complete documentation index, see [llms.txt](https://dev.guardian.hedera.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev.guardian.hedera.com/guardian/workspace/policies/library-of-policy-examples/trustchain-reports.md).

# TrustChain reports

For a demo example of following steps, here is the policy timestamp: **1675176247.137536341**

## **Task**

Create a report to check a chain of documents.

## **Preparation**

We will use [example 4](/guardian/workspace/policies/library-of-policy-examples/mrv-document-operations.md) to assemble multiple documents to build a realistic-looking *Trustchain*.

Let’s add several additional attributes into the documents to simplify the document search.

![Adding Entity](/files/IAdtop5vh0FY2LC920Ou)

![Adding Status](/files/VacGEAus6swhdcGbreKV)

![Adding Entity](/files/TraNRzRaynWFK9pWu6VU)

![Adding Entity](/files/QcxsYZFBRkH2xpOBYBuf)

![Adding Type Attribute](/files/qN8pHsjVSUTryHNTAYt1)

## **Building the trustchain report:**

1. Using the ‘***reportBlock***’

1.1 Add new container

![Adding new container](/files/54DkXbRvcGKyK5UW0MO6)

1.2 Add ‘***reportBlock***’

![Adding reportBlock](/files/Bl7XvuzE1U9zamV3hVfd)

In Guardian policy ‘**reportBlock**’ finds VP documents based on their *id* or *hash* and displays document information, related policy and token information. To retrieve the linked information ‘**reportItemBlock**’ must be used.

1.3 We will build the following chain in this example: **mint \_VP – MRV Report – Project (approved and signed the the Approver) – Approver document – Project (created and signed by the user) – User document.**\_

We will need 6 ‘**reportItemBlock**’ items correspondingly, 1 per each document.

![Adding 6 reportItemBlocks](/files/nOGdl0jGMvbUfG5G8Y7G)

The ‘**reportItemBlock**’ items are executed sequentially, thus in the filter for each consecutive ‘**reportItemBlock**’ we can use values from the previous blocks/documents.

1.3.1 ‘**mint\_document**’. To find this document which described the token mint operation we will use one of the **Common Variables** - *actionId*

![Using actionId value](/files/n8RzsSC8jgbFoUC3u3Zy)

1.3.2 ’**report\_document***’*. To find the MRV report (i.e. data document which was the basis of the decision to mint tokens) we will also use one of the **Common Variables** – *documentId*

![Adding documentId value](/files/hku96OUXmDtHXS1fYZsq)

To find further documents we will need to use values from the **Ref** variable which point to the previous document. Let’s save in a new variable:

![Using Ref variable](/files/I7trIkiGDVV1Vi7PWOWv)

1.3.3 ’**project\_document(approver)***’* - Lets use the previously defined variable alongside the static filtration parameters.

![Using previously defined variables](/files/cWDQ7cOi1TQwaTQAZGE4)

Save the author of the document signature so we can display the information about the user later

![Saving document signature](/files/B9TPfFIMx3xHsUXA3j0J)

**Use the same approach to continue the chain until the end.**

1.3.4 ***’*****approver\_document*****’***

![defining approver\_document block](/files/hHGeAFvoYmflfEIw1yU1)

1.3.5 ’**project\_document(user)***’*

![defining project\_document(user) block](/files/BRNyE3D24wteF0ieIStO)

1.3.6 ’**user\_document***’*

![defining user\_document block](/files/6ABCHlzgY2mCCR7ekS4R)

2. To activate the ‘**reportBlock**’ an id or a hash of the VP document is needed, we will add the grid containing the list of the VP documents and links to the trustchain.

2.1 Add ‘**interfaceContainerBlock**’, ‘**interfaceDocumentsSourceBlock**’ and ‘**documentsSourceAddon**’

![Adding 3 Blocks](/files/Vki33dn4e1S8kXJOGjkv)

2.2 Add new column with the type **BUTTON**

![Adding type Button](/files/PN4HGXjyVDD9a5Mw1IBy)

Setting the **Action** to LINK will cause the Policy Engine to attempt to switch the display to the target policy block upon the user clicking the link (if possible).

## **Demo**

### VPs:

<figure><img src="/files/OyPWTUezDNLnnZNnhkHH" alt=""><figcaption></figcaption></figure>

### Trustchain:

<figure><img src="/files/2tCfGMZ7oUzG8Tq5we1S" alt=""><figcaption></figcaption></figure>
