You can find this section in HostBill Admin → Extras → Statistics & Reports.
HostBill gives you access to statistics related to the income, sign-ups and support tickets. You can choose the period of time for which you want to display the statistics.
Income statistics display data related to your income. Please note that these are gross income statistics and do not include gateway fees. Available statistics include:
Yearly income
Current Month Income
Yearly income by country
Monthly income by country
Yearly income by service
Monthly income by service
Yearly income by gateway
Monthly income by gateway
Yearly Sign-ups
Current Month Sign-ups
Yearly Sign-ups by country
Monthly Sign-ups by country
HostBill allows you to generate various reports, either using pre-defined templates that can also be customized or optionally you can create your own report based on your individual needs.
All core HostBill reports are in fact SQL queries in HostBill database. After executing query Report module takes care of displaying results in one of the admin-defined output: HTML, PDF, CSV, JSON, SQL or Plain Text. If you or your staff members are familiar with SQL you can easily customize existing HostBill reports or build your own from scratch.
By default HostBill comes with dozens of pre-installed reports - those reports cannot be removed. If you find that some report is missing some important data, or is a good starting point for your custom report, you can customize it.
All reports are divided into categories/groups. By default reports are assigned to following groups:
You can also create you own groups simply by clicking on "Create new group" button and add or assign existing reports to the group (by customizing given report).
Please note:
To customize a report choose the report from the list and click on Customize button on the right. You will see a similar screen with various configuration options to customize the report:
{$previous_year_end} - last day of previous year
Optionally, you can use smarty modifier: datemove to further modify available variables.
|
To create a new report simply click on Create new custom report button and you will be redirected to report configuration page. Best practice is to choose current report that uses data similar to what you're trying to achieve, and use "Customize" button next to it, allowing you to modify SQL query for this report.
To have your columns appear in Available columns, make sure to add alias to each column using SQL keyword AS like
SELECT id AS `Account ID` FROM hb_accounts |
Columns without aliases will not have option to export
When editing SQL query using Reports section you'll be using editor with syntax highlighting and hints. Second feature is worth describing:
In editor use CTRL(/Command)+Space combination - you'll be presented with list of all tables in your HostBill database - this way you will not be required to memorize all of them!
After entering table name and "." dot symbol in SQL you're refering to table field - use CTRL+Space to see all available fields for this table
Adding to regular MySQL functions HostBill provides two custom functions you can call from your SQL queries:
Example:
SELECT hb_currency(total) AS `invoice total`, hb_date(date) AS `invoice date` FROM hb_invoices |
Please note - those functions work from reports scope only - calling them on DB directly will not work.
While working with reports you can save current report columns, parameters and conditions into a widget to be displayed on dashboard. After setting report as described above, proceed to section 4. of report editor. Here you can enter:
Note:
Once ready click "Add widget" to store report widget.
Below widget setup box you can work with Previously created widgets (remove them).
Note that if your mysql query for report has changed, you most likely will need to re-create them.