Migrating Code-Based Reports with Subreports and DataTables to RDLX

Posted by: gerardo on 1 September 2026, 7:49 pm EST

  • Posted 1 September 2026, 7:49 pm EST

    Hi

    I have several code-based reports that contain one or more subreports, either within the detail section or in a group footer. In the current implementation, the report data is typically passed to the report as a System.Data.DataTable.

    What is the recommended approach for implementing the same reporting structure in RDLX? Specifically, how should I handle passing a DataTable as the data source and binding it to subreports when the subreports are located within a detail section or group footer?

  • Posted 2 September 2026, 4:52 am EST

    Hi Gerardo,

    1. For Migration

    SectionReports and RDLX reports are architecturally very different, so direct migration to RDLX may require manual changes.

    To migrate your Code-Based SectionReport to RDLX, you’ll first need to save your SectionReport as an XML (.RPX) report. You can do this by using the ‘SectionReport.SaveLayout’ method.

    You can learn more about saving a report as RPX here: Save Section Reports.

    Then you can use the ActiveReports Import tool to convert RPX files to RDLX. You can find the import tool at “C:\Program Files (x86)\MESCIUS\ActiveReports 20\Imports\ActiveReports.Imports.Win.exe”.

    You can learn more about it here: Importing SectionReport.

    You can choose a banded layout in RDLX reports to have a similar architecture to your SectionReport.

    Do note: As RDLX reports are not event-based, any custom script gets lost in the migration process.

    2. Runtime DataSource

    To use your DataTable as a DataSource for an RDLX report and SubReports, you’ll need to handle the ‘LocateDataSource’ event of the parent report and assign your DataTable to the ‘args.Data’ property.

    You may learn more about it here: DataSet Provider.

    Please find attached a sample implementing the same for your reference.

    Regards,

    Anand

    RuntimeDataSource.zip

  • Posted 2 September 2026, 2:11 pm EST

    Thank you for the example — it was very illustrative.

    I have a couple of additional questions based on the handler in the example:

    private void Report_LocateDataSource(object sender, LocateDataSourceEventArgs args)
    {
        if (args.DataSet.Name == "Categories_DS")
        {
            args.Data = CategoryDataHelper.GetCategoriesDataTable();
        } 
        else if (args.DataSet.Name == "Products_DS")
        {
            args.Data = ProductDataHelper.GetProductsDataTable();
        }
        else
        {
            throw new NotImplementedException();
        }
    }
    1. How can I retrieve the context of the current “iteration” from which this event handler is being invoked?

      For example, if I needed to retrieve the CategoryID from the current iteration so that I could pass it to the following method:

      ProductDataHelper.GetProductsDataTable(CategoryID)
    2. In the example you kindly provided, DataTable is used as the data source, which is similar to what I mentioned in my use case. However, for scenarios where loading the entire dataset into memory would not be desirable, how could I pass a SqlDataReader directly as the data source?

    Thanks again for your help.

  • Posted 2 September 2026, 8:30 pm EST

    I’ve been experimenting with different DataProvider implementations, but I haven’t found a way for an RDLX report to consume data in a streaming fashion. From what I can tell, the report engine seems to materialize the entire dataset in memory before generating the report.

    Is my understanding correct? Or is there a way to configure the report engine so that it processes the data incrementally, without requiring the entire dataset to be held in memory?

    More specifically, I’m trying to determine whether it is possible to execute a report with a bounded memory footprint, where the amount of memory required is significantly smaller than the total amount of data that must be processed to generate the report.

    For example, if the underlying query returns several gigabytes of data, is there a way to generate the report while keeping only a limited portion of that data in memory at any given time?

  • Posted 3 September 2026, 3:27 am EST - Updated 3 September 2026, 3:33 am EST

    Hi Gerardo,

    1. To get the instance parameter passed to the SubReport, you’ll need to create a new Parameter for the DataSet and bind this new parameter to your Report’s parameter.



      Now this parameter will be accessible within the ‘LocateDataSource’ handler, and you can retrieve it using ‘args.Parameters’ property.

      Please find attached the updated sample that implements the same for your reference.

    2. Unfortunately, ActiveReports does not support streaming of data at the moment. It requires fetching the data first and then processing the rendering of the report.

      This happens because:

      • The report may need to evaluate expressions multiple times at multiple places, referencing any data row.
      • It supports features like sorting, grouping, totals, page breaks, and subreports that can require multiple passes or entire data loaded in memory.

    Regards,

    Anand

    RuntimeDataSource_Updated.zip

  • Posted 3 September 2026, 11:02 am EST

    Hello Anand,

    Thanks for your help with this matter.

    The reason for migrating the code-based reports to RDLX is that the documentation does not recommend using code-based reports for new development [https://developer.mescius.com/activereportsnet/docs/devops/features-devops/report-types-devops].

    I have the following questions:

    1. Is there a planned date or timeline for discontinuing support for code-based reports?
    2. Other than RDLX, which of your report types support data streaming and are recommended for new development?
  • Posted 4 September 2026, 1:31 am EST

    Hi Gerardo,

    1. As far as we know, there’s no plan to deprecate SectionReports, and it is still under Active Development. Regarding the statement ‘We suggest using the Section report type for migration use cases only.’ in the documentation you mentioned, we have requested clarification from the development team and will let you know of any updates.

    2. Unfortunately, none of the report types support data streaming at the moment. For the recommended report for new development, we are consulting our development team and will let you know what we hear back from them.

    Escalation ID: AR-37879.

    Thanks,

    Anand

  • Posted 4 September 2026, 7:22 pm EST

    Hi Anand

    I appreciate your support and will stay tuned for further information.

    Best regards,

    Gerardo

  • Posted 7 September 2026, 1:18 am EST

    Hi Gerardo,

    The development team has affirmed that there are no plans to discontinue support for SectionReports, and the report type recommendation for new development depends on the requirements and does not necessarily require picking Page/RDL Reports.

    Regards,

    Anand

Need extra support?

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

Learn More

Forum Channels