fmCustomReportsForm - Custom Reports Section
Store Manager allows you to work with a third-party program (Report Tool) for report development and editing. Download User's Manual to learn more about this tool.
In case you want to add some logo or change text format for some columns, you just need to modify report template (you do not need to modify SQL files).
To edit one of report templates follow a few steps:
Remember that every report besides of its template, needs some data to be displayed. To customize the data for any report (in case you would like to add some additional information to your report) you have to modify .sql files. SQL files are stored in Reports\SQL sub-folder. Please note that this requires some SQL skills. Please note that the modification of the report is not a feature of Store Manager itself and we do not provide support for the third-party application (Report Tool).
You're welcome to contact us for additional consultations.
To create your own osCommerce custom report you should complete the following steps:
1. Create one or more SQL queries to select required data.
2. Design report template - click "Design Report" button to show report designer.
3. Click "Preview Report" button to see your creation.
1. Data selection - create report queries
The page that appears has 2 parts: all available SQL-queries are listed at the top and the contents of selected Query at the bottom.
First thing you need to do is to create SQL-queries for your report, which will select required data. "Visual Query Builder" button will simplify this task. It allows you to build queries on different database servers without deep knowledge of SQL syntax. Result sets from SQL queries are presented in a combination form of view trees and table views.
On the Visual Query Builder Page you can see Query Builder and Results tabs. Query builder page has the following sections (left to right): Query tree view, Main (work area), list of available tables and selected table fields parameters area. At the very bottom of the page you can find generated query code. You can modify query code, however you will lose plan (objects placing in query constructor and their joins). So it's better not to modify query code manually, you can always enter query constructor and correct the plan visually.
Constructor working area and the list of available tables support Drag&Drop technology, i.e. for placing table into working area drag it there with the mouse, or double-click on table title in the available list of tables.
To include any field from the table in the query, mark it. Marked fields appear in the fields parameter table area. That is all that necessary for query building. You can see query code at the bottom of the page, and on Result page tab you can see data which the query has returned.
You can drag two or more tables to work area, all tables need to have a similar field which we will use to join them. By dragging this field from one table to another we create a connection between two tables. There can be a multitude of joins between tables. For link parameter settings, place the cursor on the “join line”,right click and select Edit item. The link properties window appears, where you can set the required join operator (can be selected from a dropdown) according to values: left and right objects (tables), left and right columns. Now it is necessary to mark the fields which are to be included, and group it according to the common field. To perform this tick off "*" fields in both tables, and also common field in the second table. In the field parameters area selected fields appear. After that we need to select sorting for common field. That is all. Query is ready.
Click on Run Query button to see the results. On the Result page tab you can see data which the query has returned.
These results can also be exported to Excel by hitting Export to Excel button
When you're done, click OK button
2. Report template - design report layout
After you've created query(ies), the report layout can be designed. When you click on Design Report button a blank report page will appear. Let us describe briefly the assignment of the Report objects which can be found at the Page tab. The basic objects you'll most likely need to work with are the “Band” and “Text” objects.
You can also find Code and Data tabs at this page.
When switching to the “Code” tab of the FastReport editor you'll find tools for working with the script.
A script is able to perform data handling, which cannot be performed via regular means of the Report core, for example, to hide useless data according to any predefined condition. The script is also used for controlling properties of dialogue forms, which are the components of the report. The script should be written using one of the languages, which are the components of the script engine. Currently, the following languages are supported:
The following FastScript features available in the script engine:
You can create scripts in the FastReport designer, which contains the scripts’ editor with syntax’s highlighting. Also there is an embedded debugger, which possesses the following functions: “Step,” “Breakpoint,” “Run to cursor,” and “Evaluate.”
There are the "Text" and "Draw" elements on the "Data" page. Using such elements, you can draw simple diagrams like this one:
Please Download User's Manual and see detailed description of all toolbars and options as well as directions on how to create a Report.
When you're done with report template you can preview the report itself by clicking Preview report.
8. Reports >