of the request will open.
If the query can theoretically display more than 10,000 thousand rows, it is advisable to use the TOP 1000 or TOP 10000 limits after the SELECT command to check it; Stop the report - if the report takes a very long time to load, or you just decided to stop the execution - this can be done by clicking on .
This button turns red and active when the report is running. Transfer of fields selected in SELECT to report columns.
Columns are always added to the report with a request. To add columns, click the button .
After clicking, the system will itself determine the columns and their names and add them to the report: The system will also display these columns in the "Tables" block, where user can customize them.
Column settings are described in the "Work with columns" section. The system automatically adds all columns.
Unnecessary ones are deleted by clicking on . Later they can be added from the "Table" block.
Transfer the report parameters to the "Parameters" field for customization. To transfer parameters, click .
After clicking, the system itself will determine what the parameters are and will transfer their names to the "Parameters" field.
Parameters that have not been migrated are displayed in the sql query editor in red, and those that have been migrated in green.
Each parameter must be configured, how to configure them and in what formats the parameters can be in the sql query code is described in the "Work with parameters" section.
All fields selected through SELECT in sql query are displayed in two places - above the constructor and in the "Tables" block: All fields selected through SELECT in sql query are displayed in two places - above the constructor and in the "Tables" block: Initially, all fields are automatically added to the report after clicking the button in the sql query window, and are displayed above the constructor and in the "Tables" block.
After deleting any field, you can then add it back by clicking on the + next to its name in the "Tables" block.User can change the order in which the fields are displayed - simply by dragging and dropping their names in the upper block.
User can also change the size of the columns by stretching them.
The appearance of the columns in the upper block fully corresponds to how they will be displayed in the report.
To change the parameters of a field, click on its name - after that a window with the following parameters will open: Format - this field appears if you select the data type "Number" or "Date".
Link - allows user to add a link to another page, data or something else.
For example, there is a request: SELECT SKU_ID SKU, SITE_LINK LINK FROM MONITORING The SKU column displays product codes, and the LINK column displays links to the site.
In this case, if user select a link to LINK in the "Link" field in the SKU column settings, then in the report, when user clicks on the number in the SKU column, a link from the LINK column will open.
The link can only be added to other columns; Width - the user can limit the possible field width in the report.
The value must be entered in pixels. If the width is auto, then the field will be stretched to fit the text.
Style Сell - editing a separate style for displaying information in the report.
The process is similar to editing in any other text editor; These two column setting fields are always set together.
These parameters allow you to implement cross-columns - when multiple data from other columns are displayed in one column.
For example, this allows user to display data on product sales for several weeks in one line, without manually adding a separate column for each week.
This functionality will be explained in more detail in the example below.
You can see that the report displayed 10 lines, but in a not very convenient format.
It would be much more convenient if all weeks and sales were displayed in one line with the product, then there would be only two lines for each store.
In this form: Parameters are values that the user selects when running a report.
This allows user to select only data that meets the user's criteria.
Parameters are automatically transferred from the code in the sql editor to the "Parameters" block after clicking the button .
After the parameters have appeared in the "Parameters" block, they can be configured.
There are two types of parameters: For example, if user needs to pass the number "5" as a parameter, user uses the format :parameter after the equal sign.
As a result, after starting the report, the parameter will work in the code as: where value = 5.
If user needs to transfer a set - for example (1,3,8), then user uses the format [parameter_list] without equals sign.
As a result, after starting the report, the parameter will work in the code as: where value in (1,3,8).
User can use any convenient parameter names, the main thing is to use the correct format.
To configure a parameter, click on the parameter name in the "Parameters" block.
After clicking, a window opens with the following parameter settings: Min - minimum parameter value.
Can be used for numbers, dates, weeks, months; Max - the maximum value of the parameter.
Can be used for numbers, dates, weeks, months; Query - filled only for the "Select" format.
To display possible queries, user have to enter the text 'select' in the field, available queries will automatically appear in a list.
When the report is run, the information pulled from the request will be displayed in a drop-down list when the parameter value is selected.
The following queries are now automatically supported (but you can also create additional ones): Index - can be entered only for parameters such as Date, Week, Month.
The index allows user to automatically subtract or add a value to the parameter.
So if user sets the Date and Index parameter to -10, then by default when the report is run, the date value will be displayed 10 days less than the specified default date in the "Value" field.
If the value field is left blank, the date will be subtracted from the current one; Value - a default value is entered that will be displayed when you select options before running the report.
Ниже приведены варианты задания параметров в sql запроŃе для разных типов данных: where sku_id = :sku_id - used to select a specific sku by the MySales code.
When the report is run, one SKU number is passed to the parameter.
The parameter type must be "Number"; where sku_id [sku_id_list] - used to select multiple sku by MySales code.
When the report is run, a set of SKU numbers separated by commas is passed to the parameter.
Parameter type there should be a "List"; where item_code = :item_code - is used to select a specific SKU using the internal code.
When the report is run, one text code is passed to the parameter.
The parameter type must be "Text"; where item_code [item_code_list] - is used to select several sku by the internal code.
When the report is run, a comma-separated set of SKU SCP text codes is passed to the parameter.
Parameter type must be "List"; where ((sku_id = :sku_id) or (:sku_id = 0)) - complex parameter - used for the ability to display all sku or one specific one.
In this case, to display all sku, the value 0 is put down for the parameter when starting the report, or the number of a specific sku to display one sku; The above examples of setting parameters in the code are relevant for all types of parameters and fields.
To work with the report composer, it is very important to understand the structure of the database in order to understand what data to get from which tables, what are the names of the fields, how to link data from different tables.
User can call the structure of the base by clicking on and choosing "Show DB".
After selection, a window will open in which all tables and all fields in them will be displayed.
A search works in the database window, which allows user to find the tables and columns.