|
| 1 | +--- |
| 2 | +title: Configuring Report Templates |
| 3 | +page_title: Configuring Report Templates in Web Report Designer |
| 4 | +description: Learn more about Report Templates in the Telerik Reporting Web Report Designer, how to create and reuse them. |
| 5 | +slug: web-report-designer-report-templates |
| 6 | +tags: web, report, designer, wrd, report, template, trtx |
| 7 | +published: True |
| 8 | +position: 9 |
| 9 | +--- |
| 10 | + |
| 11 | +<style> |
| 12 | +img[alt$="><"] { |
| 13 | + border: 1px solid lightgrey; |
| 14 | +} |
| 15 | +</style> |
| 16 | + |
| 17 | +# Configuring Report Templates in Web Report Designer |
| 18 | + |
| 19 | +|Minimum Version:|Q4 2025| |
| 20 | +|----|----| |
| 21 | + |
| 22 | +The Web Report Designer lets you create report templates that simplify and streamline the report creation process. A **report template** is a reusable design that defines the layout, styling, and data structure of a report. |
| 23 | + |
| 24 | +To control how application users utilize templates, developers can configure specific folders for storing report templates and manage user access to these folders. |
| 25 | + |
| 26 | +## Configure Report Templates Folder |
| 27 | + |
| 28 | +All report templates are stored in a specific **Report Templates** folder. A default folder will be created at root level of your project. You can also navigate to a specific custom folder that contains all the report templates you wish to use. |
| 29 | + |
| 30 | +The [`ReportDesignerServiceConfiguration`]({%slug telerikreporting/designing-reports/report-designer-tools/web-report-designer/how-to-set-up-in-.net-5-and-.net-core-3.1-applications%}#add-configuration-settings-in-the-startupcs-file) class provides a configuration setting for specifying the `TemplateDefinitionStorage`. Thus, you can navigate to a specific folder that stores all report templates: |
| 31 | + |
| 32 | +````CSharp |
| 33 | +services.TryAddSingleton<IReportDesignerServiceConfiguration>(sp => new ReportDesignerServiceConfiguration |
| 34 | +{ |
| 35 | + TemplateDefinitionStorage = new FileTemplateDefinitionStorage("templates_folder_path", new[] { "sub_folder_to_exclude" }), |
| 36 | +}); |
| 37 | +```` |
| 38 | + |
| 39 | +>note Report templates (.trtx files) can be stored only in the configured `Report Templates` folder. Other file formats are not allowed in the folder. |
| 40 | +
|
| 41 | +## Managing Permissions |
| 42 | + |
| 43 | +To restrict specific actions or features for users on the client side, for example, to limit access to the `Report Templates` folder, use the [`DeniedPermissions`]({%slug telerikreporting/report-designer-tools/web-report-designer/web-report-designer-customization%}) setting of the `ReportDesignerServiceConfiguration`. This setting allows developers to customize the designer experience by disabling certain tools, components, or capabilities based on application logic or user roles. |
| 44 | + |
| 45 | +````CSharp |
| 46 | +services.TryAddSingleton<IReportDesignerServiceConfiguration>(sp => new ReportDesignerServiceConfiguration |
| 47 | +{ |
| 48 | + DeniedPermissions = ReportDesignerPermissionsBuilder.Build( |
| 49 | + Permission.Commands_AssetsManager_ReportTemplates |
| 50 | + ) |
| 51 | +})); |
| 52 | + |
| 53 | +>note You can override the [`GetDeniedPermissions`]({%slug telerikreporting/report-designer-tools/web-report-designer/web-report-designer-customization%}) method in your custom implementation of the reporting service and apply different restrictions based on the currently logged-in user or other conditions. |
| 54 | + |
| 55 | +## Allowed Operations for Restricted Users |
| 56 | + |
| 57 | +````CSharp |
| 58 | +services.TryAddSingleton<IReportDesignerServiceConfiguration>(sp => new ReportDesignerServiceConfiguration |
| 59 | +{ |
| 60 | + DeniedPermissions = ReportDesignerPermissionsBuilder.Build( |
| 61 | + Permission.Commands_AssetsManager_ReportTemplates |
| 62 | + ) |
| 63 | +})); |
| 64 | +```` |
| 65 | + |
| 66 | +Once the end-user is **not** granted permissions for the Report Templates, the following actions are available: |
| 67 | + |
| 68 | +* Create a New Report from a Template - The **From Template** option remains visible even when the user lacks permissions to manage templates. In this restricted mode: |
| 69 | + |
| 70 | + * Users **cannot** create or upload new templates. |
| 71 | + * Users **cannot** delete or edit existing templates. |
| 72 | + * Users **can** still create new reports using the available templates. |
| 73 | + |
| 74 | +>caption Restricted User |
| 75 | +
|
| 76 | + |
| 77 | + |
| 78 | +>caption Default User |
| 79 | +
|
| 80 | + |
| 81 | + |
| 82 | +* Opening the **Assets manager** - When a *restricted* user opens the Assets Manager, the `Report Templates` folder is invisible and inaccessible: |
| 83 | + |
| 84 | +|Restricted User|Default User| |
| 85 | +|----|----| |
| 86 | +||| |
| 87 | + |
| 88 | +* **Save Report As** - The *restricted* end-user can **only** save as a **Report**. The option for saving as a **Template** is hidden. |
| 89 | + |
| 90 | +|Restricted User|Default User| |
| 91 | +|----|----| |
| 92 | +||| |
| 93 | + |
| 94 | +## See Also |
| 95 | + |
| 96 | +* [How to Edit a Report Template]({%slug web-report-designer-how-to-edit-a-report-template%}) |
| 97 | +* [Working with Report Templates]({%slug web-report-designer-report-templates%}) |
| 98 | +* [Report Templates in Standalone Report Designer]({%slug telerikreporting/designing-reports/report-designer-tools/desktop-designers/standalone-report-designer/report-templates%}) |
0 commit comments