Magento – Custom ReportsStore Manager for Magento allows you to evaluate the overall efficiency of your store using Magento Custom Reports.
General Information, Report Structure and RulesAs well as general reports, Custom reports can be created and edited directly in Store Manager. Its possible to edit existing Sample reports and also create new ones. A report is presented as a paper page. At any place on the page, a user is able to define report’s appearance as well as to add objects which can display different information. While creating a new Report the structure is chosen. So the page orientation can be set choosing between two data layouts - tabular and columnar, there are some color schemes available for your report etc. There are some sample reports available. You need to specify the report period (dates) and it will be shown to you. The built report can be displayed, printed or exported into one of the supported formats. Everything can be performed in preview window.
Create New Custom ReportTo create your own custom report you should complete few steps:
- Select Custom Reports at your Store Manager and press Create New Report Button on the Custom Reports Toolbar.
- Specify the name of your New Report.
- Create one or more SQL queries to select required data - click "Visual Querty Builder" button to simplify this task. 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 create SQL-queries for your custom 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 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 on 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 must have a similar field which we will use to join them. By dragging this field from one table to the other we create a join between the two tables. There can be multiple 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 drop-down) 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
- Design Magento custom report template - click "Design Report" button to show report designer.
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.
- “Band” object allows creation on a design page, of an area which has definite behaviour, according to it’s type.
- “Text” object displays one or several text lines within the rectangular area.
- “Subreport” object allows inserting an additional report design page inside the basic one.
- “Barcode” object displays data in the form of barcode (many different types of barcodes are available).
- standard language set: variables, constants, procedures, functions (with nesting capability) with variables, constants, default parameters, all standard operators (including case, try, finally, except, with), types (integral, fractional, logical, character, line, multidimensional arrays, set, variant), classes (with methods, events, properties, indexes, and default properties);
- declarations of the following types absent: records, classes in the script; no records, no pointers, no sets (however, the 'IN' - "a in ['a'..'c','d']" operator usage is possible), no shortstring type, no unconditional jump (GOTO);
- types’ compatibility checking;
- ability to access any report’s object.
- When you're done with report template you can preview the report itself by clicking Preview report.
Documentation for Store Manager for Magento is available here