4D v13Video script |
||
|
4D v13
Video script
Video script
For this video, we're going to learn how to use the Quick report editor. To change things, we're going to move our database to a Mac.
On the Mac, we'll find the file that we transferred on Windows Exchange which is actually a package whose contents can be displayed. The contents contain:
To start an application on the Mac, you can drag either the .4dbase file or the .4DB file like you do on Windows.
The main interest in establishing a database is to store data. For the moment, we have done this by displaying data on screen in a form that was predefined by the programmer. However, in many cases, your users may want to adapt their data extractions to particular needs not specified in the specifications or on an ad hoc basis. The Quick report editor quickly meets this need. You can open the Quick report editor from the toolbar, or by programming it. We're going to copy the contents of the "Query" button and insert it into the "Report" button while replacing QUERY with QR REPORT which takes 5 parameters:
then 3 more parameters that we're going to set to TRUE
Of course, we're also going to adapt the Technicians table.
The screen consists of 4 areas:
To quickly produce a report:
You'll notice that a subtotal row is displayed in the area for each sort criteria that you add. In subtotal rows, you can add summary calculations by right-clicking on the intersection where the row and column meet. To go further using this editor, we're going to change pages and display the list of interventions. We can perform a search before using the Quick report editor, but we can also do so directly from the editor. The calculation that we're going to perform concerns the number of interventions made by technicians for a given period. So first we're going to search the interventions for the desired period, for example December 2011:
Now we double-click on "Technician_initials", added to the upper part of the screen, and Object. If we print the form as it now stands, we'll get a list of 314 records for December 2011. But what we want to get is the number of interventions for each technician. So first of all we need to:
Printing will give us the same list as before, but sorted by the specific criteria. Since we have not indicated anything in the subtotal rows, they do not appear on screen. To count the number of interventions, just right-click on one of the columns in the Technician_Initials subtotal row and choose Count. When it is printed, this row now appears with the number of interventions per technician: 44 interventions for the same technician. We can do the same thing for the Object subtotal row and we get 10 training sessions, then 9 and so on for a total of 44 interventions for the technician. The detail rows don't really concern us. We can right-click on the title of the Detail row to hide it. Only the subtotal rows are printed. To indicate that the body is hidden, its row is filled in with a gray grid. During printing, we can see the distribution but since we have hidden the Detail row, we can no longer see which technician and which object go with these values. To find out, we can just type the # symbol in the subtotal rows. Let's begin with the technician: we can now see the name of the technician next to the number of interventions. We can do the same with the object:
When we print it, we can see that it now corresponds to what we wanted: the number of interventions divided by type of intervention and with the total for each technician. The Quick report editor is a powerful tool where you can add and modify columns, perform programmed calculations and then send the resulting reports not only to a printer but also, for example, to a disk file. A system dialog box lets you name your file and choose its location. We find the export and if we open it with a text editor or a spreadsheet, the information is all there. |
PROPERTIES
Product: 4D |