![]() Rows and columns have a similar property you can use it if autosize is disabled for the matrix. To do so, disable the Autosize property of the matrix. You can also manage the size of the object manually. In this mode, the object sets the column width and row height automatically, depending on the content. Since a matrix is a type of the Table object, it allows setting the row and column size in a similar way.īy default, the Autosize mode is enabled for the matrix. The red indicators will show where the second value will be added (above-below or left-right):Īfter you have added the second value, all the consequent values will be added in the selected direction. You can also select the cells order when adding the second cell to the matrix. If there are several cells, they can be placed next to each other vertically or horizontally. Select No, if you are not going to print the totals on this cell.Ī matrix can contain one or several data cells. You can select another function in the context menu of a cell by selecting Function: Returns the total of values in the matrix cells.įor the cells added to the matrix, the sum function is used by default. Below is the list of functions that you can use: Its value will be displayed in the total rows and columns. Configuring cellsįor the matrix cells, you can select a function that will be used when calculating totals. The Suppress Totals option allows suppressing the total row if the group, for which the total is calculated, contains only one value. If you enable this option for the Year cell, as shown in the figure above, then each year will be placed on a separate page when printing the matrix. The Start New Page item allows breaking up the page when printing a matrix. ![]() To bring it back, open the context menu of an element and select Totals. You can delete the total by selecting it and pressing Delete. To each field that you add to a matrix header FastReport adds the total (a cell with the "Total" text). You can change sorting by selecting Sort in the menu. To configure a header element, right click on it to open the context menu:īy default, the data in the matrix header are sorted in the ascending order. To delete an element, select it and press Delete. You can also change the order of existing elements by dragging and dropping them: In this example, the new field will be inserted between the Year and Name fields: If the matrix already contains elements (headers, cells), then when you insert a new element an indicator is displayed. The place where the new data will be inserted is highlighted red: This way you will create rows, columns, and cells. ![]() To configure the matrix structure, drag the data source fields from the Data panel to the matrix. Configuring the structureĪfter you've placed a new Matrix object to the report sheet, it looks like this: The grey columns in the figure are calculated automatically. This report is based on the same data, as the previous one. The following matrix element - subtotal and total - is demonstrated by this figure: The first field, as before, contains the row index and the second and third fields - the column index. In this example, the number or index of the column consists of two values. The matrix dynamically expands if a row or a column with the specified number does not exist yet. When you create a report, FastReport creates a matrix in the memory and fills it with data. The first field contains the row number, the second – column number, the third – content of the cell on the crossing of the row and column with the specified number. To create such a report, you need only one set of data (query or table), which has three fields and the following data: a, b – row headers, 1, 2, 3, 4 – column headers, a1.a4, b1.b4 – cells. In the figure, you see a matrix with two rows and four columns. Let's take a closer look at the matrix elements: When adding data, the matrix grows in height and width. It is not known beforehand how many rows and columns a matrix will contain - it depends on the data. ![]() The Matrix object is a type of table, and like the Table object, it consists of rows, columns, and cells. ![]()
0 Comments
Leave a Reply. |