<style>
table th:first-of-type {
	width: 20%;
}
table th:nth-of-type(2) {
	width: 80%;
}
</style>

# SharedDataSource Component

> The SharedDataSource component as of **R1 2023** is fully supported in the [Web Report Designer](https://www.telerik.com/products/reporting/documentation/designing-reports/report-designer-tools/web-report-designer/overview). The [Standalone Report Designer](https://www.telerik.com/products/reporting/documentation/designing-reports/report-designer-tools/desktop-designers/standalone-report-designer/overview) can open reports with `SharedDataSource` components, but cannot edited them.

The [SharedDataSource component](https://www.telerik.com/products/reporting/documentation/api/telerik.reporting.shareddatasource) enables report designers to easily create and reuse a data source component across multiple reports.

Additionally, end users of the [Web Report Designer](https://www.telerik.com/products/reporting/documentation/designing-reports/report-designer-tools/web-report-designer/overview) will be able to easily design their own reports with predefined `SharedDataSource` components.

All `SharedDataSource` componenents are accessible, by default, to all end-users via the [`Asset Manager`](https://www.telerik.com/products/reporting/documentation/designing-reports/report-designer-tools/web-report-designer/tools/shared-resources#assets-manager).

The `SharedDataSource` component currently supports the following [data source components](https://www.telerik.com/products/reporting/documentation/designing-reports/connecting-to-data/data-source-components/overview):

* [SqlDataSource](https://www.telerik.com/products/reporting/documentation/designing-reports/connecting-to-data/data-source-components/sqldatasource-component/overview)
* [WebServiceDataSource](https://www.telerik.com/products/reporting/documentation/designing-reports/connecting-to-data/data-source-components/webservicedatasource-component/overview)
* [ObjectDataSource](https://www.telerik.com/products/reporting/documentation/designing-reports/connecting-to-data/data-source-components/objectdatasource-component/overview)
* [JsonDataSource](https://www.telerik.com/products/reporting/documentation/designing-reports/connecting-to-data/data-source-components/jsondatasource-component)
* [CsvDataSource](https://www.telerik.com/products/reporting/documentation/designing-reports/connecting-to-data/data-source-components/csvdatasource-component/overview)

To add an existing shared data source to your report, follow these steps:

1. Open the **Explorer** tab in the **Web Report Designer**.
2. Locate the **\[Shared Data Sources]** item in the tree, then hover on it.
3. Click the **...** icon right next to the item.
4. Select **Add Existing Shared Data Source**.
5. Choose the desired shared data source, then click **Save**.

   ![A context menu with the "Add Existing Shared Data Source" option.](https://www.telerik.com/products/reporting/documentation/assets/3df279fe1c41b3e4f4fe33e016134149/add-existing-shared-data-source-context-menu.png)

> tip Existing data source components can be configured into `SharedDataSource` components via the **Explorer** tab in the **Web Report Designer**. Left-clicking the data source component will open the *context menu* from which the option **Save As Shared Data Source** can be chosen.

## Configuring the Component

**Configuration inside the SDSX file:**

Inside the `.sdsx` file, the *internal* data source component can be edited and/or the `Description` of the `SharedDataSource` component can be written:

![SDSX Configuration Page in the Web Report Designer with JsonDataSource component selected for sharing](https://www.telerik.com/products/reporting/documentation/assets/79d5c122352ca27b5ac32af48e8909b5/sdsx_configuration_page.png)

**Configuration inside the Report Definition:**

| Setting | Description                                                                                                                                                                                                                        |
| ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name    | Represents the text that will be displayed next to the component's icon.                                                                                                                                                           |
| Path    | Represent the relative(to the report definition) path to the `.sdsx` file. [Report expressions](https://www.telerik.com/products/reporting/documentation/designing-reports/connecting-to-data/expressions/overview) are supported. |

![Preview of a pre-configured SharedDataSource in Report opened in the Web Report Designer](https://www.telerik.com/products/reporting/documentation/assets/f40a7288dbee197a1e35c5de63565016/sdsx_configuration_inside_report.png)

## Resolving SDSX XML

By default, the `.sdsx` files are resolved with path relative to the report definition in which they are utilized. However, Telerik Reporting does not impose any restrictions on how or where these files will be stored.

The `.sdsx` can be stored in any kind of storage, the only requirement is that if the local file system is not used, a custom `SharedDataSourceResolver` should be implemented via the `<sharedDataSourceResolver>` configuration option - [processing configuration element](https://www.telerik.com/products/reporting/documentation/doc-output/configure-the-report-engine/processing-element)
