Cloning TRDP Report in Telerik using Angular and C#

1 Answer 11 Views
.NET Core Report Designer (standalone)
Krunal
Top achievements
Rank 1
Iron
Iron
Krunal asked on 28 Feb 2025, 11:02 AM
We are using Telerik reporting and  have embedded the Telerik report designer in our application (frontend of which is developed using Angular and backend in .net core). As part of integration, we need to implement the clone functionality of existing report. 
Our goal is to allow users to clone an existing TRDP report by providing a new report name and selecting a source TRDP file from a file dialog. The cloned report should then be saved on the Telerik Report Server with the new name. Below is a detailed description of the functionality we are trying to achieve and the challenges we are facing.

Expected Functionality:

1).The user clicks a Clone Report button in our Angular application.
2).A modal opens with:
   => A text input field where the user enters the new report name (e.g., OfficeCloneReport).
   => A file selection dialog to allow the user to select an existing .TRDP file (e.g., OfficeReport.trdp).
3).Upon clicking Save, the selected OfficeReport.trdp file should be cloned and saved as OfficeCloneReport.trdp 
on the Telerik Report Server.
4) Embedded Telerik report designer should open up with OfficeCloneReport.trdp open in designer.

Issue We Are Facing:

There is no clear documentation on how to achieve this cloning process within the Telerik Web Report Designer API.
We need guidance on the proper API endpoint or method to clone and save the report with a new name.

Questions: 
 1).Once clone button is pressed, how to save the existing trdp file with new cloned report name on report server via API or any other mean? How to open up the newly created off
 2).Is there a way to programmatically duplicate an existing TRDP report and rename it?
 3).What is the correct API method to handle this operation in Telerik?
 4).Are there any sample implementations or best practices for achieving this functionality?
 
We would appreciate your guidance on the best approach to handle this scenario in Telerik Web Report Designer.
Thank you for your time and support.

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 11 Mar 2025, 10:02 AM

Hello Krunal, 

Thank you for the provided information about the scenario!

You mentioned the Telerik Report Server, however, do you refer to the Telerik Report Server product or your own server with the Reporting REST Service? I will assume it is the latter since you have had a license only for the Telerik Reporting product.

Also, I will assume that you are saving the TRDP/TRDX files on the file system, as this is the only option that we offer out of the box. If that is indeed the case, then there is no need to rely on Telerik APIs for copying the file, you can use the File.Copy method to create copies of the report definitions.

If you save the new copy in the directory used by the Web Report Designer as definition storage, or in other words - the path that you have provided to the FileDefinitionStorage, the new report will automatically be accessible by the Web Report Designer.

To open it in the Web Report Designer, you may simply initialize a new instance of the widget - Web Report Designer Initialization Options - Telerik Reporting. However, for the widget to open the report that you are currently selecting instead of the last opened report, you may need to edit the settings of the Web Report Designer, see How to remove opened reports from the web designer - Telerik Reporting for more information on the topic.

I hope that the provided information will help achieve the desired behavior. Let me know if you have any additional questions.

Regards,
Dimitar
Progress Telerik

Enjoyed our products? Share your experience on G2 and receive a $25 Amazon gift card for a limited time!

Tags
.NET Core Report Designer (standalone)
Asked by
Krunal
Top achievements
Rank 1
Iron
Iron
Answers by
Dimitar
Telerik team
Share this question
or