Microsiga Protheus® offers the personalization resource for some register and movement reports. Main functionalities are definition of color, style, size, sources, brakes, cell mask tor each section, formula creation and functions (Sum, Average, etc.), with the possibility to sale configurations by user and graphic creation.

With the Customizable Reports functionality, the user can modify standard reports creating its own layouts.

Remember not all reports can be customized. For example, reports that have a predefined layout by law and forms (dockets, invoices, etc.) cannot be modified.

The customized reports are saved with the extension .PRT, differentiating them from standard reports that get the extension .##R.


Important

To use customizable reports, the parameter MV_TREPORT (numeric type) can be edited in the Configurator module, according to the following options:

  • 1 = use standard report (R3);
  • 2 = use customizable report (R4);
  • 3 = question which report swill be used: standard - R3 or customizable- R4.

It is possible to print ODF files using TReport (R4) for Windows and Linux. The PDF file is possible to print using the FWMSPrinter class.



Procedures

To print reports:

1. When selecting the report, the following screen is displayed:

The System displays the window to configure printing:


Printing

The shown list box must be used according to report outflow feature. See below.

The report will be saved in disk with the following name. If the selected option Server is saved on a specific directory on user password, through the Configurator, always in the server (standard\SPOOL\).

In choosing the option Location a window is opened to choose the location where the report will be saved in the local machine, the user logged in.

 Tip

The report generated from this option must be printed or sent by email after being displayed on screen.

Forwards the report to be printed via Windows® configuration of installed printers.

E-mails the report (internet). For this, the following parameters must be configured on the Configurator Module:

Enter the email account to identify and provide reports.


Example:

- [email protected]

Defines the password of the e-mail account to send reports.

Defines the server of the e-mail account to send the report.

    Define the name of the executable file of Linux spreadsheet program                                    


Example:

smtp.totvs.com.br

When this option is selected, enter in the highlighted field from the following picture, the email address where the report must be sent to.


2. After completing all necessary data and click Printto send the report, the System will show the window of the New Message, with data below:

In this field will be shown the email subject suggestion.

Enter report description to be sent.

Check this box to receive a copy of the email be sent.


 Tip

It is possible to sent the generated report to more than one user. This can be done by registering the e-mail group. Check the topic Email Groups for more details.


Export the report to Microsoft Excel® in XML format

Generate the report in HTML format. Also, generated reports can be broadened or reduced on visualization.

For File, Spool, and HTML printings it is possible to choose between printing on the Server or on the Work Station (Local). The Configurator module it is possible to define if the user can print Server or Local.


Role

Select paper size where the report is printed.

Paper size specifications are market standards, and based on selected size, Protheus will adjust printing.

Select printing format, clicking the options Portrait or Landscape, making the report to be printed in vertical or horizontal direction, respectively.


Configuration

To edit the suggested option, type the report header.

Choose the order in which information are shown on the report, clicking the available keys.

Allow to select the report model for printing, as new layouts are saved to a report, their names will be listed on this box

Display the report generated on screen, making possible, in the sequence, sending to the printer or canceling the printing.

This option allows a report to be generated and sent to the printing queue, while the user can run other System tasks.


Parameters

Parameter configuration follows the same procedures as standard reports. But some customized reports from Human Resources modules bring forth new functionalities, where it is possible to print non-sequential data intervals. For more information, check topic Configuring Data Interval in Parameters.

Company Management

Provided a new functionality in reports (TREPORT) that allows to execute filters using the Company Management concept.

1. In the Report Options window, click Company Management.

2. The following filter options are displayed.

3. Mark the Company Management levels that must be filtered and complete the filters To/From as desired.

Tip

The presentation of levels to filter report is variable and depends on layout configuration of the Company Group, for example: EEEEUUUUFFFF.

4. After filter confirmation, click Print.

5. Information are shown according to the selected filter and the last page printed will show total for each level on Company Management.


Customize

In the left side of the screen Customize, are shown the report sections, that represent different groups of information, for example, Commission Report data are split on sections or breaks: Commission Report, Sales Representative Identification, Title Data and Total Values.

Main Section

The first section is the main section that define general features of the report.

For the main section, you can define:


Properties

The default height for all the rows in the report. We recommend that you define this configuration considering the size of the font used.

For each section, you can also define the row height. The system applies the row height in a differentiated manner.

Define spacing in points (character) between columns

The left margin in points (character) for the whole report. You can also define the left margin of each section, creating indentations in data display.

The page number of the report from which printing must start. This feature is useful when you want to restart printing starting a specific page in the report.

The font and size of letters to be used in the whole report. All the fonts available in the operational environment are listed but the font size is limited to sixteen (16) points.

The font used in the report can be printed thicker than common.

The font used in the report can be printed underlined.

Define the display or inhibition of data from: report header, footer, initial pages for configuration of parameters, additional information and comments, respecting the user's rights.

Layouts

Allow to delete saved printing layouts.

View layout

Allow to view the printed report for the configured layout.

Specific sections

While opening the sections tree, the sections specific to the report are displayed, which may receive attributes individually. Simply place the cursor on the section title and configure it.

For example:

For example, for the section Sales Representative, you highlight with borders and for the section Data in the Titles, you highlight with color.

Note there are three areas to configure sections: Properties (shown automatically); Cells and Filter (shown on the lost part of the screen).


For specific sections, you can define:



Properties

Print

Define if item data of the section must be printed. If the section is blocked, only its totals will be displayed, as a summary report.

Define if section title will or not be printed.

Define if the cells (fields) will be shown in column or row format. If the option Rows is selected, in Columns (cells in row), you can define the number of cells per row to be printed.

Cell Header

Whether the column headers (field names) must be displayed.

Configure header presentation above each cell (top of the page).

Repeat header every time there is a header breaker.


Height and Distance between Rows

Row height and distance between rows can be adjusted. We recommend that you define this configuration considering the size of the font used.


Left Margin

The space in points for the left margin of the section. To print, the report margin plus section margin will be considered.


Row Break on Column Printing

When the report has many columns, then, depending upon the font used, information may be truncated. Thus, with this option selection, if not all the columns fit the same row, the System continues to print the data in the next row.


Adjust Cells

If the font size is big, you may have to adjust the column size to balance the space used and to prevent data from being truncated.

The System automatically provide column sizes, bringing forth information according to the amount of field positions. Even so, titles and column data can be truncated in case there is not enough space.

It is also possible to make individual cell adjustment, see the topic Cells.


Break Page Before

Mark this option to print each section in a new page.


Color

You may define RBG colors as background and font selection. The first button defines background color and the second button font color.

For selection, select the desired color on the left side or the window or turn the triangle into the desired color, drag the internal point to the desired shade. Or type the amount or Red, Green and Blue to comprise a color.


Border

It is possible to print rows to separate information from sections, using the border resource. The fist button defines cell border and the second button defines cell header border.

For section separation, it is possible to apply the upper, lower and side borders, just click each side.


Cells

Each section shows a set of cells.

Cells are field columns shown as report sections. To add or inhibit, and define its attributes, just click the Cell bar under the screen.

The left side lists field table data used on the report.

The right side Cells are related to selected fields to introduce the section being defined.

To add or remove cells in the section, just click them and use the arrow buttons. Cells can also be moved up or down, changing report positions.

To the right of the window are defined cell properties:

Field title is suggested, but can be edited.

Number of reserved positions to show cell data. Indicates field size.

Format to present data in AdvPL syntax. A standard field mast is suggested.

Align cell and title data. With automatic align, the System analyses the type of field and align to the left if character, memo, date or logic and to the right if numeric, if configured on Data Dictionary (SX3).

Similar to section adjustment, define individually the cell width automatic adjustment.

If the field is type character or memo, make the automatic row break to show the whole text.

If the data size to be printed is smaller than the header, it will be considered header size.

If this box is not enabled, even cell title can be cut to make it possible adjust data visualization.

Similar to section configuration, it is possible to specify borders, background and font specifically to a cell.

Allow to create, edit and delete data printing conditions with different colors.



Formulas

Formula creation allow to make calculations with cells selected to the report. It is possible to create complex formula structures, using AdvPL commands.

The preparation of formulas must be detailed, because it can compromise the report processing performance. For each printed cell line, the System needs to calculate the formula again.

To define them, click the field Formula and, next, the Arrow.

Next, a screen will be shown, to the right on the window, where report cells are related.

Double click a cell to use the formula. Formula area will represent them as CELL (<order>). From there, formulas can be comprised by AdvPL functions, using repetition commands as If, While, For, or as simple mathematic operations.



Accumulators

Accumulators allow to create cells with total, average, minimum and maximum based in other numeric cells as well as create occurrence counting cells based on any data.

To define them, click the field Accumulator and, next, the Arrow.

From an accumulator will also be created graphs for final report presentation.



Accumulator

Define the type of accumulator to be created: if totalizer, minimum value, maximum value or occurrence counting.

Accumulators are created based in a grouping cell, for example: to create an accumulator that totalize invoiced commissions by sales from each customer, it is necessary that values be grouped by customer.

In this case, double click the name of the cell Customer, the list of cells to the right, to add to the field Group by. It is possible to group the accumulator in more than one cell.

Data will be accumulated. For example: Commission.

In this case, double click the name of the cell Commission, the list of cells to the right, to add to the field Formula.

Use expressions in AdvPl® for accumulator composition.

Accumulators can be printed in separate at the end of the report with the presented statistic data.



Chart

From the Accumulator it is possible to create different types of charts (bar, line, pie etc). Charts can be saved in BMP file with the same name as the report file.

If there are various accumulators with graphs, .BMP files will be saved in the sequence (matr1501.bmp, matr1502.bmp, etc) on the spool directory. if deleted the file .BMP, the chart will no longer be shown.

Define chart name.

Define chart series name.

The graph will be shown at the end of the report.



Cell

Define a cell title.

Define chart series cell size.

Define the data format to be printed.

An accumulator can be used only for graph creation, therefore, if there is no interest in show it on the report, just uncheck this option.



Filters

Filters select report data from conditions defined by the user. To define a filter, used tables will be shown on the main section.

Therefore, to define a filter, place on the main section and click the Filter bar shown in the lower part of the window.

Fields from the main table will be available for filter composition.

After report configuration, click Save to save the model and use it as necessary.

Next, in the initial report configuration window, click OK to generate the report.