Tutorial - Summary Report

Note Before reading this tutorial, please read Summary Report Setup first.

In this tutorial we will show you how to create a Summary Report. 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:

Note that there is a calculated field:

 

Steps to Create the report

1. Open PHPMaker

Open PHPMaker and connect to the demo database.

2. Add a Summary report

Right click Reports on the database pane then click Add Summary Report, or click Edit in the main menu and then select Add Summary Report.

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.

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 search for some fields in the Ext. Search column.

To show the grouping fields as row, enable also the Show grouping fields as row option in Table Options.

3. Generate scripts

Go to the Generate tab, click the Generate button to generate scripts.

4. Run the 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:

 

 

Also See

Tutorial - Drill Down Report

 

 ©2002-2025 e.World Technology Ltd. All rights reserved.