Add a Data Set

A data set fetches data from the Trimble Unity database tables to display data in a report. The DataSet panel is where you provide a command type and query string and choose other options for your data set. Common Values can also be used and are generic report fields that can be added to a report.

WORKAROUND: When a data set is updated or rebound, the data set is cleared from a banded list and a table. After updating a data set, select the banded list or table in the report to open the Banded List properties. Select the correct Data Set Name from the Data section to re-establish the link. If it's not updated, no results are returned when the report is generated.

NOTE: If multiple data sets are adding, the report reads them read top to bottom.

  1. Open the Report Designer.
  2. Click the Data tab.
  3. Click Add in the Data Sets section.

  1. Double-click the DefaultDataSet.

It appears under the Data Sets section.

  1. Click Edit Data Set.

  1. Edit the Name of the data set. Data set names cannot have spaces, but underscores or camel case can be used.
  2. Select Command Type. The default is Text.
  3. Enter a query to gather the desired fields from the desired database tables. These are the fields that are used to create reports.

TIP: To add an entire table to a report, enter the following in the Query field: Select * from <table>. See Common Query Examples and Add a Dataset in the Mescius documentation for more a more in-depth explanation of data sets and crafting queries.

  1. Click Validate.

IMPORTANT: Users may encounter an error when attempting to validate a data set that contains any of the keywords listed below (including in SQL comments). This is a protective measure used to identify and block potentially unauthorized database commands.

  • insert
  • update
  • delete
  • drop
  • execute
  • exec
  • sp_
  • xp_
  1. Click OK.

BEST PRACTICE: It is best to include only the necessary fields in the query to reduce the load on the application calls to the SQL Server instance. This approach ensures that the application logic iterates through fewer fields, optimizing performance.

The fields appear in the Data Sets panel on the right side. Now these fields can be dragged and dropped in to a report.

If a data source hasn't been added, a connection to the Trimble Unity database is automatically added in the Data Sources section.