How do I make the following workaround work:
It should allow cloning for ReportData objects but following the steps of the workaround, still the CloneObjectAction is not showing for ReportData items.
You can consider the following solutions depending on the reporting module version you are using:
Reports V2 Module
1. If a report was created at design time in Visual Studio, consider one of the following solutions:
1.1. Use the Copy Predefined Report Action to clone a predefined report and then modify the copy (supported for both WinForms and ASP.NET);
NOTE: When you create a predefined report with scripts that will possibly be modified by end-users, do not use XtraReport events directly. Instead, use the XtraReport.Scripts and/or XRControl.Scripts properties in the Report Designer, as demonstrated in the Scripting Overview topic. Otherwise, your code will not be copied to user scripts via the Copy Predefined Report Action. If you use this approach, add references to assemblies used in scripts to the XtraReport.ScriptReferences property. Assemblies used in your application will be attached to scripts automatically. If classes from such assemblies cause errors when scripts are evaluated, either use fully qualified names, or add the using (Imports in VB) directive at the beginning of the script.
1.2. If you happen to have a ready *.REPX definition for your report, create a new report and then use the built-in import and export commands in the WinForms or design-time report designer (unavailable for ASP.NET).
1.3. You can copy the corresponding files - YourReportName.cs, YourReportName.resx, YourReportName.Designer.cs. Alternatively, create a separate assembly with your reports and reference this assembly in all projects where these reports are required.
2. If a report was created at runtime, consider one of the following solutions:
2.1. Copy data rows in the ReportDataV2 table manually using your database server means;
2.2. Copy related ReportDataV2 persistent objects using programmatic solutions from the Should I use XPO to transfer/synchronize data between databases? and How execute "copy pre-defined reports" in XAF ReportsV2 from code? articles, e.g. the Cloner or ReportsStorage.CopyFrom APIs.
2.3. Add the Clone Object module in the Module or Application Designers and set the BOModel | DevExpress.Persistent.BaseImpl | ReportDataV2 | IsClonable property to True in the Model Editor to enable the Clone Object Action for Views with ReportDataV2 objects (available for XPO only):
With EF, you can use any native EF approach to clone the ReportDataV2 object, since it is a simple record in the database with a serialized report.
Reports Module (Obsolete)
Use the 2.1 - 2.3 solutions, but work with the ReportData table/type instead of the ReportDataV2 one. Be sure to add the ReportsModule component using the Module or Application Designers before invoking the Model Editor for customizations.