Tuto WINDEV 25

Part 4: Full application with data 227 Overview The presentation of statistics or summary tables is often required in a management application. This type of presentation can be used for example to follow: • the evolution of orders in time, • the evolution of turnover, • the evolution of stocks, • ... Any executive manager wants to get this information. WINDEV proposes several controls allowing you to easily include this information in your applications. Two specific controls will be used in this lesson: • the Chart control. • the Pivot Table control. Answer If you did not create the windows in the previous lessons, you can follow this lesson by opening a corrected project: in WINDEV’s home page (Ctrl + <), click "Tutorial" and select "Full application (with windows)". A full corrected application project is also available: in WINDEV’s home page (Ctrl + <), click "Tutorial" and select "Full application (Answer)". Displaying data in a Chart control To handle the Chart control in real conditions, we are going to create a Chart control displaying the status of sales in the "WD Full Application" application. First of all, we are going to create a query used to select the data that will be displayed in the Chart control. Selecting the data that will be displayed in the Chart control To create our chart, we want to get the sum of orders by date. We are now going to create a query used to perform a sum. Indeed, we are going to calculate the total amount of orders (TotalIOT item in the Orders data file). We are going to calculate the total amount of all orders per date (the Turnover per date). ▶ Create a new query: 1. Click among the quick access buttons. 2.  The window for creating a new element is displayed: click "Query". 3. We are going to create a select query. Select the "Select" option. Go to the next step. 4.  The description window of query is displayed. 5. Add the items Orders.Date and Orders.TotalIOT to the query: • On the left, expand the "Orders" data file. • Double-click the Date item then the TotalIOT item. • The two items appear in the middle of the screen (in the "List of elements in your query" area).

RkJQdWJsaXNoZXIy NDQ0OA==