ActiveReports 13
Cross Tab Report
ActiveReports 13 > ActiveReports User Guide > Samples and Walkthroughs > Samples > API > Section Reports > Cross Tab Report

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

<User Folder>\Documents\GrapeCity Samples\ActiveReports 13\API\Section\CrossTabReport\VB.NET


<User Folder>\Documents\GrapeCity Samples\ActiveReports 13\API\Section\CrossTabReport\C#


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. A copy is located at [User Documents folder]\GrapeCity Samples\ActiveReports 13\Data\NWIND.mdb. If you are unable to access the data files in the sample, create the Data folder and place all the data files to this folder, or change the reference path to the data files within the folder according to your environment.


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