ActiveReports 14
ActiveReports 14 User Guide / Samples and Walkthroughs / Samples / Samples / API / Section Reports / Cross Tab Report
In This Topic
    Cross Tab Report
    In This Topic

    The CrossTabReport sample displays hierarchical information in a cross tabular structure. This sample consists of a StartForm with an ActiveReports Viewer control and a ProductWeeklySales report.

    Sample Location

    Visual Basic.NET

    ..\Samples14\API\Section\CrossTabReport\VB.NET

    C#

    ..\Samples14\API\Section\CrossTabReport\C#

    Details

    When you run the sample, a report displaying a list of weekly sales for current week, month, quarter or year for each product category is displayed in the Viewer control. The values highlighted in red represent negative values.

    Note: To run this sample, you must have access to the Nwind.mdb. The NWIND.mdb file can be downloaded from GitHub: ..\Samples14\Data\NWIND.mdb.

    StartForm

    The Viewer control has the Dock property set to Fill. This ensures that the viewer resizes along with the form at run time. Right-click the form and select View Code to see the code used to run the report and display it in the viewer. ProductWeeklySales Report:

    ProductWeeklySales Report

    This report features a number of accumulated values using summary function property settings and calculated values in the code.The summary function displays a list of summary values only for weekly sales total in group footer without displaying the Detail section. By setting the Height property of Detail section to 0 and/or hiding the Detail section by setting Visible property to False, you can create a summary report that only displays sections other than the Detail section.
    Based on the order date of Detail section data, you can determine whether it will be included in a week, month, quarter, year or previous year's quarter and set the values by sorting in unbound fields. Value of each unbound field is automatically summarized by each Field placed in the group footer section.

     

    See Also