Skip to main content

Use Custom SQL in Advanced Report

Advanced reporting in Device42, introduced mid-2018, empowers you to create and schedule extremely complex reports that the old reporting engine simply couldn't handle. You can also combine all of the built-in reports and features that advanced reporting includes out-of-the-box with your own custom SQL objects to achieve an entirely new level of reporting flexibility, including using SQL's ability to pre-process and transform objects as part of your query.

Create an Advanced Report Using Custom SQL

  1. Head to Analytics > Reports > Advanced Reporting.

  2. Add a new Advanced Report and give it a name.

  3. Don’t select any categories; instead, choose the Add SQL button at the bottom right.

  4. Give your new SQL object a name, and then proceed to enter your query into the Custom SQL Object form. Select a unique key field from the dropdown at the bottom of the window (a unique key is required). Click Okay twice:

    Create advanced report with custom SQL

    *You’ll notice all of the categories are now greyed out. The SQL query you provided has taken care of this, so there’s no need to choose any here.

  5. Head to the Layout tab. Use the report designer to format your report data by choosing the fields you’d like to include in the report.

  6. Click Finish to save.

  7. You’re done! You can go back and edit as you see fit. Run your report at any time, or sort and filter it further.