The states, the baseForewordIf you find it difficult to follow the text that follows, you can also consult the following subpage, which describes in detail the sequence of operations to be carried out to build the first report described in this document: ▸ Click-by-click description of how to build the state described below The set of cards that serves as an exampleFor this part, we are going to use our simplified invoice form, and create 3:
The first stateFrom there, we can create a report that lists the invoices:
Its construction, step by step
Step 1: the 'Spec. collection'They allow you to specify where and what. For this first very simple example, only the first two parts interest us.
Then we fill in the 'Form type' table. Step 2: the 'Fields' parametersThey specify the list of fields (columns) of the report. In our example, we get: For each control that defines a report column: Below is the definition of a column obtained by calculation: The calculation is performed on collection, which means that the calculation formula can use all the fields of the collected record. Step 3: the 'Display' parametersThese parameters define:
In our example, only the order is specified, namely according to the ascending order of the 'Date' column. Filter and group will be seen in our second example. Step 4: activate the stateA level of 'Collection', select 'Browse the forms' Note: when you change the fields of a report, add or remove parameter input fields (see below) you may need to ask 'Collect' 'Rebuild' then 'Collect' 'Browse the forms' so that the data update themselves. A second state, with filtering parametersHere is our second report, which lists all the orders for a given part, between two dates. Item code : Joint
Its constructionLet's start by observing it in 'Organize' mode with the 'Detailed' option to see the blocks that compensate for it: We see that we no longer have a single 'State' block, but a series of blocks. Here an input field 'filter_code' followed by a table containing two cells, with in the first an input field 'from' and in the second an input field 'to'. For this, let's see the three series of parameters which, as previously, were used to define the state: We note first of all that in the new report, we do not have one line per file, but one line per line of the 'article' sub-table of each file. This is specified by the parameter 'Name of the field to use to find the different lines' Then, we have a row filtering formula which is: (code contains filtre_code) and date>=du and date<=au and which is read, only the lines for which the code column contains what is specified in the parameter field 'filter_code' that we added at the head of the report, and for which the date is between that indicated in the field parameter 'from' and the one indicated in the parameter 'to' field. A third state, with groupageWe are going to illustrate the line grouping function via a third report which lists, for each item, the quantity ordered between the two dates specified in parameter:
At the parameters' Spec. collection ', nothing changes. At the level of the definition of the fields, we now have: The small change is that the column 'date' is now hidden, since it is only used to filter the lines, and that we only want one line per item, corresponding to the total of orders on the given period. The main change is in the display parameters: We have filled in the 'Group the lines' part to specify that we only want one line displayed for all the collected lines corresponding to a single item. Note: the sorting formula must be compatible with the grouping requested, ie ensure that all the lines to be grouped are found consecutively after sorting. Balance sheetWhat we have just illustrated is that a Storga report is a sort of parametric query, which allows on the one hand to find all the records corresponding to certain criteria, to sort them, and on the other hand to perform consolidations via the grouping function. In a logic of using Storga to optimize the activities of the company, the reports are the main tool to allow everyone to access specifically the information that concerns them, in particular what they have to do, and set up reporting and automatic indicators. Go further
To complete
|