Replied 11 April 2019, 4:22 pm EST
Both, Code-based and Xml-based Reports have their own advantages. One needs to choose his reports based on his requirements. Code Based Reports:
Such reports allow the user to generate and edit reports at run-time, by adding code to report events. These reports have the related code added to their corresponding .vb or .cs files. More Information about the same can be obtained from the below mentioned documentation link:http://help.grapecity.com/activereports/webhelp/AR13/webframe.html#CodeBasedSectionReport.htmlXML Based Reports:
As you are aware that these are stand-alone reports, they are different from code-based reports at one point that here, you can change control properties at run time by adding script to report events in the script tab. The RPX format cannot contain Visual Basic.NET or C# code. Instead, you can add VB.NET or C# script in the Script view of the report.
Since these files are not compiled into your application, they are a good option for solutions in which you need to update or add reports frequently.
More Information about the same can be obtained from the below mentioned documentation link:https://help.grapecity.com/activereports/webhelp/AR13/webframe.html#XMLBasedSectionReport.html
For converting Code Based Section Report to XML Based Report you need to take the following actions:
1. Open the .cs file of the Report in the design mode and you will find a 'Report' option in the toolbar above. Click on this button and select the SaveLayout option. Save the Report to the desired location.
2. Now,create an XML Based Section Report and go to File menu, then click on Open button and select the Report you have saved from the respective Location.
3. Note that so far, the report has only been opened in the Report Layout. If you have some code in the .vb file that works when certain events of the Report are fired, then you need to copy the code from the .vb file and paste it in the Script mode of XML based Section Report.
For more information about scripting in XML based Section Report, you can visit the following documentation link:http://help.grapecity.com/activereports/webhelp/AR13/webframe.html#Scripts.html
Hope it helps.