Exago .NET API Documentation
Copy(ReportObject,String,String) Method
Example 
WebReports.Api.Reports Namespace > ReportObjectFactory Class > Copy Method : Copy(ReportObject,String,String) Method
The ReportObject that is to be copied.
The full path and name of the copied report.

Optional user-defined data string to pass along with the report.

This feature is deprecated.
Copy an existing report object in the report repository into another location in the report repository.
Syntax
public void Copy( 
   ReportObject reportObject,
   System.string newName,
   System.string udfData
)

Parameters

reportObject
The ReportObject that is to be copied.
newName
The full path and name of the copied report.
udfData

Optional user-defined data string to pass along with the report.

This feature is deprecated.
Example
Copy a report template into new folders for each quarter
//Create new folders for each quarter
api.ReportManagement.AddFolder("Sales Reports\\2021", "Q2");
api.ReportManagement.AddFolder("Sales Reports\\2021", "Q3");
api.ReportManagement.AddFolder("Sales Reports\\2021", "Q4");

//Get the content ID of the sales report template to copy
Guid mymyReportId = Guid.Parse(api.ReportManagement.GetContentIdFromPath("Sales Reports\\2021\\Q1\\Audio-Visual Division"));

//Load the template as the active report.
api.ReportObjectFactory.LoadFromRepository(mymyReportId, true);


/**
* Optionally make changes to the active report here
*/

//Copy the Report
api.ReportObjectFactory.Copy(api.ReportObjectFactory.Active, "Sales Reports\\2021\\Q2\\Audio-Visual Division", null);
api.ReportObjectFactory.Copy(api.ReportObjectFactory.Active, "Sales Reports\\2021\\Q3\\Audio-Visual Division", null);
api.ReportObjectFactory.Copy(api.ReportObjectFactory.Active, "Sales Reports\\2021\\Q4\\Audio-Visual Division", null);
See Also

Reference

ReportObjectFactory Class
ReportObjectFactory Members
Overload List