Report Generator 3.X For WHMCS
From ModulesGarden Wiki
(Difference between revisions)
|
|
Line 4: |
Line 4: |
| =About [http://www.modulesgarden.com/products/whmcs/report_generator/features Report Generator For WHMCS]= | | =About [http://www.modulesgarden.com/products/whmcs/report_generator/features Report Generator For WHMCS]= |
| {| | | {| |
− | |style="padding: 10px 0px 5px 0px;"|'''Report Generator For WHMCS''' allows you to generate and manage any kind of reports using inbuilt drag & drop WYSIWYG creator.<br /> | + | |style="padding: 10px 0px 5px 0px;"|'''Report Generator For WHMCS allows you to generate and manage any kind of reports using inbuilt drag & drop WYSIWYG creator.'''<br /> |
| Module lets you to adjust reports to your needs through using various filters, conditions and even your own PHP code. You can display ready reports in tables, graphs or charts.<br /> | | Module lets you to adjust reports to your needs through using various filters, conditions and even your own PHP code. You can display ready reports in tables, graphs or charts.<br /> |
| You can also generate reports in XML, CSV and PDF, as well as schedule their creating and send them over an email to specified staff members. | | You can also generate reports in XML, CSV and PDF, as well as schedule their creating and send them over an email to specified staff members. |
Revision as of 13:01, 28 May 2014
Report Generator For WHMCS allows you to generate and manage any kind of reports using inbuilt drag & drop WYSIWYG creator.
Module lets you to adjust reports to your needs through using various filters, conditions and even your own PHP code. You can display ready reports in tables, graphs or charts.
You can also generate reports in XML, CSV and PDF, as well as schedule their creating and send them over an email to specified staff members.
|
✔ Query Builder For Dynamic Reports Creating
|
✔ Full Support For Reports Editing
|
✔ Multi Sections Of Dynamically Generated Reports
|
✔ Two View Types Of Report Pages (Simple And Widget Alike)
|
✔ Automatic Reports Sending To Desired Staff Members, With Specified User Conditions
|
✔ Export To And Import From The XML
|
✔ Supports WHMCS V5 and Later
|
Installation
This tutorial will show you how to successfully install and configure Report Generator For WHMCS.
We will guide you step by step through the whole installation and configuration process.
|
1. Log in to your client area and download Report Generator For WHMCS.
|
2. Upload and extract the module into the main WHMCS directory.
Files in your WHMCS directory should look like this.
|
3. When you install Report Generator for the first time you have to rename 'license_RENAME.php' file.
File is located at 'modules/addons/reportgenerator/license_RENAME.php' . Rename it from 'license_RENAME.php' to 'license.php' .
|
4. In order to configure your license key, you have to edit a previously renamed 'license.php' file.'
Enter your license key between quotation marks as presented on the following screen. You can find your license key at your client area → 'My Products' .
|
5. Now you have to set chmod '755' or '777' to 'reports_xml' directory.
'reports_xml' file is located at 'your_whmcs/modules/addons/reportgenerator/' .
|
6. Now you have to activate the module in your WHMCS system.
Log in to your WHMCS admin area. Go to 'Setup' → 'Addon Modules' . Afterwards, find 'Report Generator' and press 'Activate' button.
|
7. In the next step you need to permit access to this module.
To do so, click on 'Configure' button, tick 'Full Administrator' and press 'Save Changes' .
|
8. Last step is setting up cron jobs
You can find them at your module 'Addons' → 'Report Generator' → 'Cron Jobs' .
|
9. You have just successfully installed Report Generator!
You can access the module at 'Addons' → 'Report Generator' .
|
Configuration and Management
Report Generator For WHMCS allows your to create custom reports using query builder and graphs.
Module has also additional useful features like predefined reports, import/export of reports, generating reports in PDF and ability to send it to admins.
|
Report List
At 'Report Lists' you can view all predefined reports as well as those created by you.
Here you can manage your reports by viewing (1), editing (2), generating report in PDF (3), exporting to XML file (4) and removing (5).
|
For predefined reports you can only generate PDF file and view report.
|
To create new report press 'Create New Report' or go to 'Reports List' → 'Create New Report' .
More information about creating new reports will be presented in the next section.
|
Report View
In report view you can see all tables and charts generated by the module.
You can display report in a simple or widget format. To switch between them press one of the buttons marked on the screen below.
|
PDF Report View
You can also view a PDF version of report which can be sent to admins or saved to PDF file on your disk.
|
Creating Report
At the beginning you have one section in your report. Each section generates one data table and a few charts on report.
At every step of creating report you can add new sections.
Below we will show you how to set up a single section.
Start from entering report name and description.
|
Main Settings
Firstly, select all tables you want to use in this section.
Afterwards, tick all records from tables you want to display.
If you will decide to display additional column, you can define it in 'Additional Columns' field.
|
To set date used in this section of report select this record from a 'Date' dropdown menu.
|
At 'Custom PHP Function' you can alter displayed result. Remember to place your code in:
<?php
// your custom code here
return $result;
?>
The '$result' variable is passed by reference and contains just iterated element of the result array.
In this way you can create new columns in your table or modify existing ones through modifying this variable.
You can access it as normal array where the key is a column name and value is a current row value.
Important: Use this field with caution, because every mistake made here can result with error in your production environment.
|
Last step here is joining tables you added to this section as it is necessary to display the report correctly.
For example, to join table 'tblclients' with 'tblactivitylog' you should join it using 'tblclients - id' and 'tblactivitylog- clientid' .
If you have more than 2 tables in your report section, it is advised to create more join relations.
|
Filters
At 'Filters' tab you can decide which records should be displayed through setting conditions.
You can use predefined conditions. Select record to apply filter on, afterwards select 'Operation Type' and type value into 'Default Value' field.
|
You can also type your own conditions using field marked on the screen below.
|
Orders & Limits
At 'Order & Limits' tab you can set the following options: 'group by' (which is necessary if you set up 'Additional Fields' ), 'order by' and limits.
To set 'Order By' , select record used to order by values displayed in report, afterwards select direction of ordering by (Ascending/Descending).
You can also use custom group by command through pressing 'Add your own group by query' and typing command in textbox which will appear.
|
In order to set group by, select record or time period to group by.
You can also use customize order by command through pressing 'Add your own order by query' and entering command in a textbox which will appear.
|
Through setting up limits you can define time period to create a report from.
To do it, simply enter a time period (in days) to create a report from.
|
Charts
'Charts' tab allows you to create any quantity of charts in your report.
You can create two types of charts which are pie chart and area chart.
|
To create a pie chart, press on 'Add a Pie Chart' button.
|
Afterwards, type chart name and select record to create a pie chart from.
|
Creating an area chart is similar. To begin, press on 'Add an Area Chart' button.
|
Afterwards, type chart name, additional column counters (which are optional) and select record to create an area chart from.
|
Saving Report
When your report is ready, save it through pressing 'Create Report' .
|
Custom Table Records Names
Our module allows you to set custom table record names, it is quite simple.
Open lang file located at 'your_whmcs/modules/addons/mg_resellers/lang' . For test purposes we have chosen 'english.php' file.
Afterwards, enter:
$_LANG['record_name'] = 'displayed_record_name';
Where 'record_name' is a record name you want to display differently and 'displayed_record_name' is a name under which this record will be visible.
For example, to change record 'groupid' to 'Group ID' use this code:
$_LANG['groupid'] = 'Group ID';
Note 1: It will set up custom name for all records with that name.
Note 2: Custom table records support Multi-Language functionality.
|
You can also set up custom table name in the same way.
$_LANG['table_name'] = 'displayed_table_name';
|
Email Configuration
At 'Email Configuration' you can set up emails with reports sent to administrators.
Simply select admin or admins to which email with report should be sent.
Afterwards, choose which of your reports should be sent.
|
Depending on the selected report, various fields will appear at 'Additional Filters' section.
You can specify report content through setting it up, for example, on the screen below we have chosen 'admin' staff member.
In this way the sent report will refer to 'admin' staff member.
Finish by selecting time period for email sending and press 'Add Relation' .
|
Import
To import report from XML file into your Report Generator go to 'Import' tab.
|
Next, press 'Upload' button and select your report XML file.
Afterwards, press 'Upload' button and your report will be uploaded to the module.
|
However your just imported report is still not available at reports list, you need to install it first.
To do so, simply press 'Install on Page' button as presented on the following screen.
|
Now you can go to 'Reports List' and see that your report has been successfully installed and it is ready to use.
|
Tips
In order to work properly, module requires PHP with a PDO support.
|
Common Problems
1. When you have problems with connection, check whether your SELinux or firewall is not blocking ports.
|
2. If you encounter any troubles with our module it is possible that you have not installed PDO.
|