In this tutorial we will show you how to create a Detail and Summary Report in ASP Report Maker. We will use the demo database for demonstration.
We will use the view "order_details_extended" to create a report which shows the order items in orders of each customer:
Steps to Create the Report
1. Loading ASP Report Maker
Open ASP Report Maker and connect to the demo database.
2. Adding a report
Right click [Reports] on the database pane then click [Add Report (Detail/Summary)], or click [Edit] in the main menu and then select [Add Report (Detail/Summary)].
The Report Setup window will show up, enter the report name, for example, we use "Sales by Customer". Select the view "Order Details extended" as source table. Select the required fields for the report (not necessarily all fields). In this example, we select all the field by clicking the [>>] button.
Click the [Grouping Levels] tab, since we want to group the order items by company and then by order, we select "CompanyName" and then "OrderID" as grouping level. (If you want to sort in group-level fields in descending order, click the button next to the field to switch the order.)
Check [Show summary] for both levels (the [Summary Values] tabs become visible).
Click the [Sort Order] tab, since we want to sort the order items by product name, we select "ProductName" as sorting field. (If you want to sort in descending order, click the button next to the field to switch the order.)
Now click the [Summary Values] tab. We want to see total price and average quantity of order item in an order, so we check [Avg] for the field "Quantity" and check [Sum] for the field "Extended Price".
We want to see details of each order item, so we use the default option [Details and summary]. We also leave [Show grand summary] checked as default because we want to know the total price and average quantity of order item for all orders.
If you want to show summary only (that is, only show the grouping fields and summary values), you can select [Summary only] and [Show compact summary view].
Click [OK] to finish.
The report will be added in database pane. Click the report to go to the Field Setup page, you can optionally enable filters for some fields in the [Filter] column.
3. ASP Script Generation
Go to the [Generate] tab, click the [Generate] button and ASP Report Maker will generate the required ASP scripts automatically.
4. Running the ASP Application
Browse the generated site, go to the "Sales by Customer" report to see the result.
Summary values are shown at the end of each level. The grand summary is also shown at the end of report.
In step 2 above, if you have selected [Summary only] and [Show compact summary view], the compact report will only show the grouping fields and summary values: