3. Custom Reports
Custom Reports can be created and edited directly in Store Manager: you can not only edit the existing Sample reports, but 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.
To access Zen Cart Custom Reports list select Reports -> Custom Reports using Main Menu or left-side bar.
There are few sample reports available. You need to specify the period of time to see the report itself. Generated report can be displayed, printed or exported into one of the supported formats.
You can choose to get any of the following Zen Cart Custom Reports:
- Best Customers - Timeline (Sample Report)
- Best Sellers Per Manufacturer (Sample Report
- Customers by Countries (Sample Report)
- Customers by Gender (Sample Report)
- Customers by States (Sample Report)
- Orders - Detailed (Sample Report)
- Orders - Products (Sample Report)
- Orders by Countries (Sample Report)
- Orders by Gender (Sample Report)
- Orders by State (Sample Report)
- Product List (Sample Report)
- Sales by Manufacturer (Sample Report)
Best Customers - Timeline (Sample Report)
To generate this report you need to specify Query Parameters (Start Date - Finish Date) first. Best Customers - Timeline Sample Report shows you the list of customers, amount of orders per customer, and the orders totals per customer. Also you'll see the total of unique customers in the specified period of time.
Best Sellers Per Manufacturer (Sample Report)
To generate this report you need to specify Query Parameters (Start Date - Finish Date) first. Best Sellers Per Manufacturer (Sample Report) shows you the list of Manufacturers, the quantity of items sold and total sales per manufacturer. Also general amount of items sold and total sales are displayed at the bottom. The best manufacturer has to be your basic supplier. You'll be able to analyze/enlarge your basic manufacturers range of goods to attract more potential customers and promote others to cooperation.
Customers by Countries (Sample Report)
To generate this report you need to specify Query Parameters (Start Date - Finish Date) first. Customers by Countries Sample Report shows you the list of countries, quantity of customers per country and their order totals. Basing on such results you'll see the geography of your customers and will be able to analyze your marketing policy.
Customers by Gender (Sample Report)
To generate this report you need to specify Query Parameters (Start Date - Finish Date) first. Customers by Gender Sample Report shows you the Gender statistics, and total orders per gender. You'll be able to analyze the gender market targeting. You'll see who is your target group, and will be able to provide corresponding marketing policy.
Customers by States (Sample Report)
To generate this report you need to specify Query Parameters (Start Date - Finish Date) first. Customers by States Sample Report is similar to the customers per country report. Customers by States Report shows you the list of states, quantity of customers per state and their order totals. Basing on such results you'll see the geography of your customers and will be able to analyze your marketing policy to meet your business goals.
Orders - Detailed (Sample Report)
To generate this report you need to specify Query Parameters (Start Date - Finish Date) first. Orders - Detailed Sample Report shows you some customers' and orders' information. You'll see: customer first and last name, phone, Order status (pending, delivered...) company, date, subtotal and total per order. At the bottom of the report you'll see the total of orders per selected period of time.
Orders - Products (Sample Report)
To generate this report you need to specify Query Parameters (Start Date - Finish Date) first. Orders - Products Sample Report shows you all information about your customers and their orders. This report helps you to see all customers and orders information in one report. The report has full information about your orders and is very easy to use.
Orders by Countries (Sample Report)
To generate this report you need to specify Query Parameters (Start Date - Finish Date) first. This report is useful for multinational stores. You'll see the geography of your orders: the list of countries, number of orders and total sum of orders per day. You'll see which country brings you the best sales.
Orders by Gender (Sample Report)
To generate this report you need to specify Query Parameters (Start Date - Finish Date) first. Orders by Gender Sample Report shows you the Gender statistics, and total orders per gender. This report is similar to Customers by Gender Sample Report and brings you some information to analyze your marketing policy.
Orders by State (Sample Report)
To generate this report you need to specify Query Parameters (Start Date - Finish Date) first. Orders by States Sample Report is similar to the orders per countries. Orders by States Report shows you the list of states, orders per state and order totals. Basing on such results you'll see the geography of your customers and will be able to analyze your marketing policy to meet your business goals.
Product List (Sample Report)
You can use few kind of filters to generate this report. You can display all products or display products where quantity is less than... and set the value you need. Also you can generate report without highlight or generate one with the highlight where quantity is less than... and set the value you need. As the result you'll see the list of products generated by selected parameters.
Sales by Manufacturer (Sample Report)
To generate this report you need to specify Query Parameters (Start Date - Finish Date) first. Sales by Manufacturer Sample Report shows you the list of Manufacturers, the quantity of items sold and total sales per manufacturer. It is similar to the Best Sellers Per Manufacturer sample report. You'll be able to analyze/enlarge your basic manufacturers range of goods to attract more potential customers and to promote others.
Create Custom Report
Store Manager allows you to work with a third-party program (Report Tool) for report developing 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 listed below:
- Run Report Tool - Go to Start -> All Programs -> eMagicOne -> Store Manager -> Report Tool (free third-party application).
- Open Report Template (.fr3 file) in the Report Tool - Go to Start -> All Programs -> eMagicOne -> Store Manager for ... -> Application Data -> Reports -> English sub-directory (for default reports like Invoices, etc) and Custom Reports sub-directory (for Custom reports). Also you can find it in C:\Documents and Settings\Your_User\Local Settings\Application Data\eMagicOne Store Manager for ...\Reports\English\ or Custom Reports sub-folder.
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 Zen Cart custom report you should complete a couple of steps:
- 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.
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 are placed at the bottom.
First thing you need to do is 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 (from 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, simply 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 need to 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. The 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 to save this entry, or click cancel button to discard this entry.
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.
- “Band” object allows the creation on a design page of an area which has definite behavior 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).
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:
- PascalScript
- C++ Script
- BasicScript
- JScript
The following FastScript features are available in the script engine:
- 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.
You can create scripts in the FastReport designer, which contains the scripts’ editor with syntax 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 such objects as:
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 Zen Cart custom report itself by clicking Preview report.