Which is "better" - code-based or XML based?

Posted by: darin on 11 April 2019, 4:57 am EST

  • Posted 11 April 2019, 4:57 am EST

    Since we have been using AR since version 3, all of our standard reports built into our program are code-based, so .VB extension. I know when we edit the format for the customer, it is an RPX file on their system.

    For the reports that are built into our program, does it matter if it is code-based or XML-based? Which is "better" - and that might just get to preference, i don't know.

    But, if XML-based is better, is there a way to convert all of our code-based reports to XML-based?
  • Marked as Answer

    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:

    XML 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:

    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:

    Hope it helps.

    Best Regards,
  • Replied 12 April 2019, 4:48 am EST

    Thanks for the info.
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels