ActiveReports 18 .NET Edition
Report Authors: Designer Components / Design Reports / Design Page/RDLX Reports / Tutorials: Report Controls in Page/RDLX Reports / BandedList Data Region in Reports
In This Topic
    BandedList Data Region in Reports
    In This Topic

    Let us create a report that shows yearly shipments for each country. To display a summarized shipment value for each country and year, we will use BandedList data region and add groups. The report connects to the 'Orders' JSON data available here.

    The final report will look as shown.

    Report with List Control

    Create a Report

    In the ActiveReports Designer, create a new RDLX report.

    If you are creating a new report in the Visual Studio Integrated Designer, see Quick Start.

    Bind Report to Data

    As you create a new report, you can configure the report data connection in the Report Wizard. You can also access the Report Data Source dialog by right-clicking the Data Sources node in the Report Explorer and then selecting the Add Data Source option. See JSON for details.

    1. On the Choose Data Source Type screen of the wizard, select JSON and click Next.
    2. To specify JSON File Path, click the Browse button and navigate to the desired file on your system. This report uses the 'orders.json' sample data source that can be downloaded from the following URL:
      https://demodata.mescius.io/northwind/odata/v1/Orders         
    3. Click the Next option and configure the dataset by adding a valid query. Enter OrderdsDataset into the Name field and select the node from the data tree in the Path section to generate the path. The resulting query is displayed in the Query field.
    4. Click Next to proceed to the final screen of the Report Wizard.
    5. Review the summary of the report and click Finish to successfully add the report with the JSON data source.

    Design Report Layout

    1. Drag and drop the BandedList control onto the report's designer.
    2. With the BandedList control selected, click the Property dialog link to open the BandedList dialog.
    3. Go to the Groups page and click Add.
    4. Set the Group on Expression to =Fields!ShipCountry.Value.
      This will ensure that the data in the banded list is grouped based on the [ShipCountry] field.
    5. Again, click Add to insert another group.
    6. Set the Group on Expression to =Year(Fields!OrderDate.Value).
      This will repeat the shipments by year for each country.
    7. Click OK to close the dialog. Group Headers and a Group Footers are added.
    8. From the dataset, drag the [ShipCountry] data field to the Group1 Header of the BandedList control.
    9. Drag and drop two Textbox controls onto the Group2 Header of the control and set their Value property as follows:
      • TextBox1: =Year(Fields!OrderDate.Value)
      • TextBox2: =Sum(Fields!Freight.Value)
    10. In the Properties pane, set the Format property for the [Freight] field to Currency.
    11. Again, drag and drop two Textbox controls onto the Group1 Footer of the control and set their Value property as follows:
      • TextBox3: Total
      • TextBox4: =Sum(Fields!Freight.Value)
    12. To add the report title, drag and drop the TextBox control to the PageHeader section and set its Value property to 'Yearly Shipments'.
      Sample BandedList Design
    13. Improve the appearance of the report and preview.
    See Also