The following steps will guide you on how to create a custom data source.
1. From the Report Menu, choose New Report Query. When the Report Query form opens enter your SQL script in the SQL Query field and click save.
Clicking Save button will then show the Record Source ID.
2. The custom data source will then be available and that you can use it for your custom report. To assign a custom data source to your custom report, highlight the custom report and click Settings button or right-click on the custom report and select Edit Report Settings.
When Report Setting form opens, select the newly created data source.