# 5.8 Preparing data for reports

&#x20;  Outputting data to a report is the final stage of work. The data in CB3 is formed into cubes, and then information is taken from this object to form reports.&#x20;

&#x20;  To generate data in the [CB Cube](#user-content-fn-1)[^1] object, you need to create a rule using the CB Modeling Rule interface. More details about it describes in the [2.2 Modeling Rules](/cloudbudget-3.0/cloudbudget-3.0/2.-system-admin-guide/2.2-modeling-rules.md) paragraph.

Typically, reports are generated based on data from the plan, as well as from actual.&#x20;

Go to the Modeling Rule interface and create a new Modeling Rule Group (MRG). In this group we will create two rules for generate plan to cube and actual to cube.

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

Make sure new group is created and hit "+ Add Rule" button for Plan data.

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

Fill the Name, for source select the Budget Line object as parent and CB Amount as child (this objects keep data of plan), CB Cube object as Result Parent. Add the Modeling Rule Lines for determine which fields generate as shown below.&#x20;

Parent fields (GLA, Division, Name, Project) are taken from the Budget Line, and the fields (Period and Value) are taken from CB Amount.

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

After that add CB Account, CB Division and CB Variable 1 into the Keys field. These keys serve to further define the source object. Then save this modeling rule.

<figure><img src="/files/28c51Bp7dhuQ83V12Vqr" alt=""><figcaption></figcaption></figure>

Modeling Rule for plan data is created.

<figure><img src="/files/50xNpHXqvpQ0VycsQGJY" alt=""><figcaption></figcaption></figure>

To create rule for actual data hi the "+ Add Rule" in the current group.

<figure><img src="/files/5nocXjghi89ekSeg3JAu" alt=""><figcaption></figcaption></figure>

Fill the Name, for source select the CB Transaction object as parent and CB Cube object as Result Parent. Add the Modeling Rule Lines for determine which fields generate as shown below.&#x20;

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

After that add CB Account, CB Division and CB Variable 1 into the Keys field. These keys serve to further define the source object. Then save this modeling rule.

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

Make sure rules for generating data in the reports are created.

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

Go to the CB Home and run the process for generating this cubes.

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

After start process in the Event Monitor appears detailed info.

<figure><img src="/files/01GpJYN3FRv9wgrzWpVM" alt=""><figcaption></figcaption></figure>

To check data after generation go to the CB Cubes tab and select ALL.

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

[^1]: CB Cube - an object for storing data used in reports


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cloudbudget-3-0.gitbook.io/cloudbudget-3.0/cloudbudget-3.0/5.-implementers-guide/5.8-preparing-data-for-reports.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
