Creating Custom Reports

Table of Contents
Creating Custom Reports

Code On Time web applications can be enhanced with custom reports.

Simple Filtered Report

For example, the master-detail report below can be easily created from a Northwind sample web application.

Simple filtered report displaying master-detail custom report.

The first step is to either extend the field dictionary of an data controller with denormalization, or create a new data controller using a database view. The report field model will be defined by a view that will be added to the data controller. A custom report template will be generated for this view.

Remove the pre-configured elements from the custom report template, and set up a tablix element to display a table of data. The master fields will be placed in the header and footer of the report. Some of the fields may require some formatting changes to display correctly.

Finally, add a Report action that will trigger the custom report.

Multi-Level Grouping

The report above works fine when the data set is filtered to a specific OrderID. When multiple orders are included in the data set, the report will have invalid data. To solve this problem, consider implementing multi-level grouping, first by CustomerID, and then by OrderID. This multi-purpose report can be rendered with different filtering parameters to produce data sets with multiple orders when needed.

Master-detail report with multi-level grouping of orders.