To create a report, a user must select a template containing the report layout. In ActiveReports 6, there are two types of such templates – the XML-based report template , ActiveReports 6 (xml-based) File, and the code-based report template, ActiveReports 6 (code-based) File. It is possible to use both types of report templates within one project.
A report layout based on the code-based template is saved as a C# or Visual Basic for .NET file, whereas a report layout based on the xml-based template is saved as an RPX file.
The RPX file is an XML-formatted file which contains the layout information and any scripts added to the report. RPX files with scripting allow to change and modify distributed reports without recompiling the project. They also make it possible to use a database of report file names to set up a collection of reports to run. You can use an RPX file with scripting as a stand-alone file in a web project. For the information on how to add script to an xml-based report, please refer to Adding Script to an XML-Based Report.
![]() |
Note: An RPX file in ActiveReports for .NET 2.0 has an associated .cs or .vb file containing code added to the report, whereas an RPX file in ActiveReports 6 does not require any associated code file. For additional information, see ActiveReports for .NET 2.0 Side-by-Side Installation. |
To select a template for a report, select Add New Item in the Visual Studio Project menu, select the template for a new report in the Add New Item dialog and then click the Add button:
![]() |
Once a template is selected, the process of designing a report is similar for both types of report templates - see the walkthroughs Basic Data Bound Reports, Basic XML-Based Reports (RPX). With the xml-based report template, a user cannot use regular code. Instead, a user is able to access the controls and sections in script editor by using "this"(c#) or "Me"(vb) in addition to the current way of using "rpt" (see Scripting for more details).
![]() |
Note: Since the RPX file can be read with any text editor, the AddCode or AddNamedItem method should be used to add secure information, such as a connection string, to a project. |