QueryTree is an ad-hoc reporting tool that works with any Microsoft SQL Server, PostgreSQL or MySQL database. It allows users to query databases, build reports and schedule those reports to email distribution lists, without needing to write any code.
For more information see the QueryTree website
QueryTree can connect to MySQL and PostgreSQL databases using SSH tunnels, secured with passwords or key files.
Supports customization of the logo image, system name and CSS used within the app.
Can use either Sqlite or Microsoft SQL Server database for it's own user and reports data storage.
Database and SSH passwords are stored in its database in encryped form, using AES encryption. Users may provide their own key file, or let the system generate one on first run. Keys can be shared between mutliple web servers in a load balancing scenario.
Users may choose to build their own plugins to store database/SSH passwords in an external key vault. This is achieved by implementing a .NET interface and registering the class in the appSettings.config file. See Building a password manager for more information.
Skip to section:
To run QueryTree from it's source code, you will need to install the .NET Core SDK. You can download the SDK for your platform here: https://www.microsoft.com/net/download/core
Once the .NET Core SDK is installed, follow these steps:
Clone this repo into a folder
At the command prompt, cd into the folder, then into the "Web" folder.
If you would like to run QueryTree with your own local development settings, you can add a Web/usersettings.json file containing a modified copy of appsettings.json. Settings in this file will override appsettings.json. However, this file will be ignored by git.
You may need to build a release binary to be run with the .NET Core 2.0.x runtime. These binaries can be used on systems without the full .NET Core SDK. To build the initial binaries you need the .NET Core SDK and NPM installed.
You will need to install the Less.js compiler using NPM:
npm install less -g
To build a release binary from the project root execute:
dotnet publish -c Release ./Web/QueryTree.csproj -o ./dist
This will create a release folder in
dist of all the unpacked QueryTree binaries and its dependencies.
QueryTree is built using .NET Core. To run QueryTree on your server you will need to install the .NET Core 2.0.x runtime. You can download the installer here.
To verify that you have the .NET runtime installed, open a terminal/cmd window and type
If the command returns a version number, you're ready to run QueryTree. If not, please visit https://www.microsoft.com/net/download/core#/runtime and follow the instructions for your platform.
Once the dotnet runtime is installed, follow these steps:
Download the release and unpack the files into a folder of your choice.
Open a terminal/cmd window and cd into the folder containing the unpacked QueryTree release files.
At the command prompt, type:
Visit http://localhost:5000/ in your browser. You should see the QueryTree application.
For use in production environments, QueryTree should be run behind a reverse proxy such as nginx. For more information on hosting QueryTree using nginx see: https://docs.microsoft.com/en-us/aspnet/core/publishing/linuxproduction
You can also host QueryTree using IIS. For information on running .NET Core apps in IIS see: https://docs.microsoft.com/en-us/aspnet/core/publishing/iis
To run the automated tests in this project, cd into the "Tests" folder, then type:
See the full Docker guide: docs/docker.md
Once all the information is entered, you can check the connection by pressing the "Test Connection" button. If the system reports that the conneciton is working, press "Save".
Click on "+ Create Report". You will be taken to the defualt report builder
All reports start by picking a datbase table to start from. From there the report builder will prompt you to select any related tables that it can join to. For example, in this screenshot, I have selected the "orders" table and QueryTree is prompting me to join the "users" table. QueryTree can see that "orders" has a link to "users" so it offers to join the tables.
For more information on how to help QueryTree automatically join between tables in your database see QueryTree's Auto Join feature
QueryTree is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
QueryTree is licensed under the LGPLv3 license. See the LICENSE file for more information.
QueryTree is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with QueryTree. If not, see http://www.gnu.org/licenses/.