Barcodes, charts and cross tabs
Three controls show data in a form other than text and ordinary tables: the barcode, which turns a value into a code that a scanner can read; the chart, which draws the values of fields; and the cross tab, which summarizes values by rows and columns. This page describes each of them and what remains of the data source path after what the program removes. For the steps to add a QR code or a barcode, see Print a QR code or barcode, and for a chart, Add a chart.
Barcode
The barcode control prints a text or numeric value as a code. Add it from the toolbox to the band you want. When it is selected, the Barcode Tools section appears in the ribbon, and the Properties panel shows the properties below.
| Property | What it does | Values |
|---|---|---|
| Symbology | The type of the code: the barcode encoding system. | The available systems include linear barcodes such as Code 128, Code 39, EAN-13 and UPC-A, and two-dimensional codes such as QR Code, Data Matrix and PDF417. |
| Text | The value the control encodes. | Fixed text, or an expression such as [Number]. |
| Show Text | Prints the accompanying text under the code. | Ticked or not ticked. |
| Module | The width of the narrowest bar in the code. | A number in the report unit. |
| Auto-Module | Calculates the bar width automatically from the dimensions of the control instead of relying on Module. | Ticked or not ticked. |
| Orientation | The rotation of the code on the page. | The list of orientations that the property shows. |
To bind a barcode to a field, write an expression that refers to the field in the text property, and the control prints the value of each record. On the lines of a sales invoice, the expression [Material_Barcode] prints the code of each material. For one code for the whole invoice, use [Number] in a control outside the detail band. The size of the control affects how well the code reads, so do not shrink it until it cannot be scanned.
Chart
This control draws the values of fields as columns, lines or circles. Add it from the toolbox to a band that prints once, such as Report Footer, because the Detail band prints once for each record.
The chart designer
When the chart is selected, click Run Designer in the ribbon, or right-click the control and choose the command that runs the designer. The chart designer opens.
| Part | What it does |
|---|---|
| Choose a data source... | Chooses the data source that the chart takes its values from. |
| The Data tab | Holds the places where you drop fields: Series, Argument and Value, and also Color and ToolTip Hint. You drag the template fields to them. |
| Series Elements | Extra elements of the series, such as Indicator and Title. |
| The series type gallery | Chooses the shape of the chart: Bar Series, Line Series, Area Series, Pie and Doughnut Series and others. |
The argument is the category by which the values are grouped, such as Material_Name, and the value is what is measured, such as Total.
The data source of the chart
The standard designer lets you add a new data source for a chart. The program removes the command to add a data source to the report from the ribbon and from the right-click menus, and hides the properties of the data source of the report. The add-data-source commands of the chart, pivot grid and sparkline tools are not removed, but the report has only its own data source. What the report offers is the data source of the report itself, which is named CurrentDb and is one stored procedure for the document type. Choose this source in Choose a data source..., and then drag the fields of the table you need, such as the Bill Items table in an invoice.
The program handles the data source of the report only: when it opens a template, it connects this source to the database and refreshes its fields. So do not add another source from the designer. To change the data, use Change Data Source when it appears (see Advanced printing data sources). For more detail, see What alameen does not allow in the designer.
Cross tab
A cross tab summarizes values in a table whose rows and columns come from fields, such as the sales of each material in each month. When you select a pivot grid, its own section appears in the ribbon, Pivot Grid Tools.
| Area in the cross tab | What it holds |
|---|---|
| Rows | Fields whose different values become rows. |
| Columns | Fields whose different values become columns. |
| Data | The fields whose values are summarized where a row and a column meet, with a function such as the total. |
To set up a pivot grid, select it and click Run Designer in the ribbon. The pivot grid designer opens, and you choose the fields and their layout there. If you convert a pivot grid to a cross tab, the command Revert to Original Pivot Grid returns it to its original state.
The data source of the cross tab is the data source of the report, as in the chart.
Example: quantity of each material by unit
In an invoice template, to show the quantity of each material by its unit:
- Add a cross tab to the Report Footer band, and choose the
Bill Itemstable from the Data Member list. - Drag
Material_Nameto Rows,UnitNameto Columns andQuantityto Data.
The preview shows a row for each material and a column for each unit, and the total quantity where they meet.
Related
This page applies to alameen ERP 10, version 10.1.79.764.