Skip to main content
Share / Export

Top Rows Parameter

Getting Started​

The @TopRows parameter allows you to control the number of records downloaded making it especially useful for large datasets.

  • Limiting the record count speeds up the download process.
  • Helps you review the data layout before making further adjustments.

This parameter can be applied to both Tables and Reports, depending on your specific needs.

Add Top Rows Parameter​

The example below demonstrates using the @TopRows parameter by downloading the Job Cost Detail (JCCD) table, which typically contains 100,000+ records.

Click the Add Report button on the left side of the ribbon.

Add Top Rows Parameter screenshot

Search for the table containing the records. The Vista form name usually matches the table name, making it easier to locate.

Add Top Rows Parameter screenshot

Either double-click on the table to select it or highlight the table and click Save Changes to confirm your selection.

Add Top Rows Parameter screenshot

The base SQL statement will download all records and columns by default.

Click the Select button to add the @TopRows parameter, allowing you to limit the number of records downloaded.

Add Top Rows Parameter screenshot

Enter @TopRows in the Top # of Rows field.

Click Save Changes to apply the update.

Add Top Rows Parameter screenshot

This will add the @TopRows parameter to the SQL Statement field.

Click Download Changes to apply the update and retrieve a limited number of records.

Add Top Rows Parameter screenshot

You will see a TopRows parameter field. Enter the number of records you want to download.

Click the Download button to retrieve the specified number of records.

Add Top Rows Parameter screenshot

The saved Parameter and SQL Statement values will reflect the number of records downloaded, confirming that the @TopRows parameter was applied successfully.

Add Top Rows Parameter screenshot

Download All Records​

When you remove the value from the @TopRows parameter, all records will be downloaded, retrieving the full dataset without limitations.

Download All Records screenshot

Download Blank Table​

Entering 0 (zero) in the @TopRows parameter downloads a blank template, allowing you to:

  • Add new records without preloaded data.
  • Rearrange columns before importing or updating data.

Download Blank Table screenshot

Remove Parameter​

To remove the @TopRows parameter, click the Edit Query button on the ribbon.

Remove Parameter screenshot

Go to the Select option on the left side of the query editor.

Remove Parameter screenshot

Remove the value from the Top # of Rows field.

Click Save Changes to update the query.

Remove Parameter screenshot

This will remove the @TopRows parameter from the SQL Statement field.

Click Download Changes to retrieve the full dataset without any row limit.

Remove Parameter screenshot