Personal tools
Namespaces

Variants
Actions

Report Generator 3.X For WHMCS

From ModulesGarden Wiki
(Difference between revisions)
Jump to: navigation, search
(Main Settings)
(Orders & Limits)
Line 224: Line 224:
 
===Orders & Limits===
 
===Orders & Limits===
 
{|
 
{|
|style="padding: 10px 0px 15px 15px;"|At '' 'Orders & Limits' '' tab you can set group by (which it is necesary if you set up '' 'Aditional Fields' ''), order by and limits.<br />
+
|style="padding: 10px 0px 15px 15px;"|At '' 'Order & Limits' '' tab you can set group by (which it is necesary if you set up '' 'Aditional Fields' ''), order by and limits.<br />
 
To set '' 'Group By' '', select record to order by displayed values, afterwards select direction of grouping by.<br />
 
To set '' 'Group By' '', select record to order by displayed values, afterwards select direction of grouping by.<br />
 
You can also use custom group by command through  pressing '' 'Add your own group by query' '' and typing command in textbox which will apear.
 
You can also use custom group by command through  pressing '' 'Add your own group by query' '' and typing command in textbox which will apear.

Revision as of 10:14, 19 December 2013

Contents

About Report Generator For WHMCS

Report Generator For WHMCS is a module which allows you to create custom reports using SQL query builder and display in with tables and graphs.

You can also generate report in XML or PDF and send it over email.

  • Features:
✔ Query Builder For Dynamic Reports Creating
✔ Full Support For Reports Editing
✔ Predefined Reports
✔ Multi Sections Of Dynamically Generated Reports
✔ Dynamic Filters
✔ Two View Types Of Report Pages (Simple And Widget Alike)
✔ Print Reports
✔ Automatic Reports Sending To Desired Staff Members, With Specified User Conditions
✔ Export To And Import From The XML
✔ Export To PDF
  • Additionally:
✔ Multi-Language Support
✔ 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.
File:RG1.png
2. Upload and extract the module into the main WHMCS directory.

Files in your WHMCS directory should look like this.

File:RG2.png
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' .

File:RG3.png
4. In order to configure your license key, you have to edit a previously renamed 'license.php' file.'

Enter your licence key between quotation marks as presented on the following screen. You can find your license key at your client area → 'My Products' .

File:RG4.png
5. Now you have to set chmod '755' or '777' to 'reports_xml' folder.

'reports_xml' file is located at 'your_whmcs/modules/addons/reportgenerator/' .

RG4 1.png
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.

File:RG5.png
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' .

File:RG6.png
8. Last step is setting up cron jobs

You can find them at your module 'Addons' 'Report Generator' 'Cron Jobs' .

File:RG7.png
9. You have just successfully installed Report Generator!

You can access the module at 'Addons' 'Report Generator' .

File:RG8.png

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).

File:RG9.png
For predefined reports you can only generate PDF file and view report.
File:RG10.png
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.

File:RG11.png

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.

File:RG12.png

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.
File:RG13.png

Creating Report

At beginning you have one section in your report, each section generate one data table and few charts on report.

At every step of creating report you can add new sections.
Below we will show you how to set up single section.
Start from entering report name and description.

File:RG14.png

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 decide to display aditional column, you can define them in 'Additional Columns' field.

File:RG15.png
To set date used in this section of report select this record from 'Date' dropdown menu.
File:RG16.png
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 refference, and contains just iterated element of the result array.
So you can create a new columns in your table or modyfing existing ones through modyfing this variable.
You can access it as normal array, where the key is the column name and value is the current row value.
Important: Use this field with caution, because every mistake made here can result with error in your production environment.

File:RG17.png
Last step here is joining tables you added to this section, it is necesary to display 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 adviced to create more join relations.

File:RG18.png

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.

File:RG19.png
You can also type your own conditions using field marked on the screen below.
File:RG20.png

Orders & Limits

At 'Order & Limits' tab you can set group by (which it is necesary if you set up 'Aditional Fields' ), order by and limits.

To set 'Group By' , select record to order by displayed values, afterwards select direction of grouping by.
You can also use custom group by command through pressing 'Add your own group by query' and typing command in textbox which will apear.

File:RG21.png
In order to set group by, select record or time period to group by.

You can also use custom order by command through pressing 'Add your own order by query' and entering command in textbox which will apear.

File:RG22.png
Through setting up limits you can define time period to create report from.

To do it, simply enter time period (in days) to create report from.

File:RG23.png

Charts

'Charts' tab allows you to create any quantity of charts in your report.

You can create two type of charts which are pie chart and area chart.

File:RG24.png
To create pie chart, press on 'Pie Chart' button.
File:RG25.png
Afterwards, type chart name and select record to create pie chart from.
File:RG26.png
Creating area chart is simillar, to begin press on 'Area Chart' button.
File:RG27.png
Afterwards, type chart name, additional column counters (which are optional) and select record to create area chart from.
File:RG28.png

Saving Report

When your report is ready, save it through pressing 'Create Report' .
File:RG28 1.png

Custom Table Records Names

You can set custom table record names, it is quite simple.

Open lang file located at 'your_whmcs/modules/addons/mg_resellers/lang' , in this example it is 'english.php' .
Afterwards, enter:

$_LANG['record_name'] = 'displayed_record_name';

Where record_name is record name you want to display differently and displayed_record_name is 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.

File:RG29.png
You can also set up custom table name in the same way.
$_LANG['table_name'] = 'displayed_table_name';
File:RG30.png

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.

File:RG31.png
At 'Additional Filters' depending on report choosed, various fields will apear.

You can specify report content setting them up, for example, on the screen below we have choosen 'admin' staff member.
This way report sent will refer to 'admin' staff member.
Finish by selecting time period for email sending and press 'Add Relation' .

File:RG32.png

Import

To import report from XML file into your Report Generator go to 'Import' tab.
File:RG33.png
Next, press 'Upload' button and select your report XML file.

Afterwards, press 'Upload' button and your report will be uploaded to the module.

File:RG34.png
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.

File:RG35.png
Now you can go to 'Reports List' and see that your report has been successfully installed and it is ready to use.
File:RG36.png

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.
Navigation
WHMCS Modules
WHMCS Widgets
Translations
cPanel Modules
General
FAQ
Community