Date: Thu, 28 Mar 2024 23:38:04 +0000 (UTC) Message-ID: <455214389.23.1711669084079@e8eaa01abd47> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_22_1046392052.1711669084078" ------=_Part_22_1046392052.1711669084078 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
You can find this section in HostBill Admin =E2=86=92 Extra= s =E2=86=92 Statistics & Reports =E2=86=92 Reports.
HostBill allows you to generate various reports, either using pre-define= d templates that can also be customized or optionally you can create your o= wn 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 Pla= in Text. If you or your staff members are familiar with SQL y= ou can easily customize existing HostBill reports or build your own from sc= ratch.
By default HostBill comes with dozens of pre-installed reports - those r= eports cannot be removed. If you find that some report is missing some impo= rtant data, or is a good starting point for your custom report, you can cus= tomize it.
To customize a report choose t= he report from the list and click on Customize button on the right. You wil= l see a similar screen with various configuration options to customize the = report:
<=
strong>{$previous_year_end} - last day of previous year
=
Modifying date variables
Optionally, you can use smarty=
modifier: datemove to further modify available variables.=
{$variab=
le|datemove:'modify by'}
Sample use cases:
To create a new report simply = click on Create new custom report button and you will be redirected to repo= rt configuration page. Best practice is to choose current report that uses = data similar to what you're trying to achieve, and use "Customize" button n= ext 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 n= ot have option to export
When editing SQL query using R= eports section you'll be using editor with syntax highlighting and hints. S= econd feature is worth describing:
In editor use CTR= L(/Command)+Space combination - you'll be presented with list= of all tables in your HostBill database - this way you will not be require= d to memorize all of them!
After entering table name and = "." dot symbol in SQL you're refering to table field - use CTR= L+Space to see all available fields for this table
Adding to regular MySQL functi= ons HostBill provides two custom functions you can call from your SQL queri= es:
Example:
SELECT hb_currency(total) AS `invoice total`, hb_date(date) AS `invoice date` FROM=20 hb_invoices
Please note - those functions = work from reports scope only - calling them on DB directly will not work.= span>
While working with repor= ts you can save current report columns, parameters and conditions into a wi= dget to be displayed on dashboard. After setting report as described above,= proceed to section 4. of report editor. Here you can enter:
Note: = span>
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.
This HostBill functionality al= lows to create snapshots: generate reports in a given time period and = store them on a server and optionally send them to staff. Thanks to this op= tion, you can get historical data, add it to admin area widgets and compare= the results in time. After setting report as described above, proceed= to section 5. of report editor. Here you can enter:
Note: Wh= en creating snapshot currently selected columns/params/conditions will be u= sed. Changing them after snapshot is created will not affect previousl= y generated snapshots.