Zoomed Image

How to Create a Custom Report or Query

xAssets IT Asset Management User Guide
How To

How to Create a Custom Report or Query

Queries are the primary way to view and report on data in xAssets. A query defines which records to show, which columns to display, and how the results are sorted and filtered. This guide explains how to create a new query from scratch.

Prerequisites

  • You must have Configuration User or Administrator access to create queries.
  • You should know which table or data source you want to query (e.g., Assets, Software, Licences, Contracts).

Steps

  1. Navigate to Admin > Queries.

  2. The queries list opens, showing all existing queries. Click New to create a new query.

  3. In the query editor dialog, fill in the basic settings:

    Field What to Enter
    Name A descriptive name for your query (e.g., "Laptops by Location with Warranty")
    Table The primary data table to query (e.g., Asset, Software, Licence)
    Description Optional description explaining the purpose of the query
  4. Click OK or navigate to the Columns tab to define which columns appear in the results.

  5. On the Columns tab, add the fields you want to display:

    • Select fields from the available field list and add them to the query.
    • Arrange the columns in your preferred order.
    • Set the column width for each field.
    • See Editing a Query Column Properties for detailed column configuration.
  6. On the Presentation tab, configure how results are displayed:

    • Set the default sort order.
    • Choose the tree hierarchy (Category, Location, Department, or Cost Centre).
    • Set any record filters to limit which records appear.
    • See Query Presentation for all presentation options.
  7. Click OK to save the query.

  8. To test your query, navigate to it from the menu or search for it by name.

Adding the Query to a Menu

After creating a query, you may want to make it accessible from a menu:

  1. Navigate to Admin > Menus.

  2. Find the menu where you want the query to appear (or create a new menu).

  3. Add a new menu item and set the Command to run your query.

  4. See the Configuration Guide -- Menus for detailed menu configuration.

Creating a Printable Report

To add a printable PDF or formatted report layout to your query:

  1. Open the query in the editor.

  2. Navigate to the report design section.

  3. Design the report layout, including headers, footers, grouping, and totals.

  4. See Query Report Design for details on report layout options.

Tips

  • Start by reviewing existing queries before creating new ones. There may already be a query that does what you need, or one you can copy and modify.
  • Use Query Variants to create multiple views of the same base query with different filter criteria. See Query Variants.
  • If you need a query that joins data from multiple tables or uses custom SQL, see System and User SQL Queries.
  • Test your query with a small dataset first to ensure the columns, filters, and sort order are correct before sharing it with other users.