The Report Output Pane¶
The Report URL¶
The URL is always visible, and it is shown broken apart rather than as one long string: the origin, the path, and then one row per query parameter with a short description of what that parameter does.
Parameters that are invalid or missing are highlighted, so an incomplete report tells you which piece it is waiting for rather than silently producing a URL that does not work. The secretKey parameter is masked until you choose to reveal it.
A finished report URL looks like this:
https://api.trackandtrace.tools/v2/packages/active/super/report?secretKey=YOUR_SECRET_KEY&licenseNumber=LIC-00001&include=labResults&rowMode=collapsed&columns=label,item.name,metadata.indexedLabResults.totalTHC.value&contentType=csv&prependCsvMetadata=false
Every part of it came from a control in the left column.
Actions¶
| Action | What it does |
|---|---|
| Generate Report | Runs the report now and downloads it. Reads Create & open sheet for Google Sheets, and is replaced by a send panel when delivery is set to email |
| Save report | Saves the current settings under a name. See Saving a Report |
| Copy report URL | Copies the full URL, secret key included |
| Copy report URL w/ IMPORTDATA | Copies the URL already wrapped in =IMPORTDATA("…"), ready to paste into a Google Sheets cell. Shown only for CSV with Download delivery |
Data Preview¶
The preview fetches up to 5 rows and is available for every format, so you can check the shape of a report before running it in full.
Two details worth knowing:
- XLSX and Google Sheets are previewed as CSV. All three contain the same rows, and a preview should never create a real Google Sheet.
- The preview tells you when it is stale. Change any setting after fetching and it marks itself out of date rather than showing you results from a configuration you have since edited.
Extra Columns Found in Your Data¶
Some real columns cannot be known ahead of time. metadata.indexedLabResults has one column per test on your packages' lab results, so its columns depend on which tests your lab ran. The keys themselves are the same in every state; see Lab Result Keys.
To find them, the column picker samples 20 rows of your own data and flattens the result. Columns discovered this way are marked, and the picker tells you how many it found.
Three things follow:
- Discovery only ever adds. The standard column list is available immediately and nothing is removed while sampling runs. If sampling fails, you get the standard list and a retry link.
- Results are cached for the session only: per report and license and include combination. Analyte names are specific to a license and a point in time, so they are never persisted.
- Discovered columns are real columns. They work in a saved report and in a spreadsheet formula exactly like any other.
This is what makes a report like "every active package with its Total THC" buildable from the picker instead of by hand.
Saving a Report¶
A saved report stores settings, not a credential. The secret key is stripped before the URL is stored, and the stored URL has no origin on it.
That has a useful consequence: a saved report keeps working when you rotate or revoke a secret key, because the key was never part of it. Saved reports belong to your Metrc account, so anyone signing in as the same username sees the same list.
To save one, use Save report and give it a name and an optional description. The panel opens inline beneath the URL so you can still see what you are saving.
Once a saved report is loaded, the button becomes Update, with Save as new and Rename alongside it. Rename changes only the name and description. Closing Metrc forgets which saved report was loaded, so a reopened builder starts with a fresh form and a Save report button.
| Limit | Value |
|---|---|
| Saved reports per account | 100 |
| Name | 200 characters |
| Description | 2,000 characters |
The same saved reports are available from the API. See Saving a report.
Scan Sheets¶
Scan Sheets is its own builder rather than a report type, so choosing that category replaces the form. See Scan Sheets.
What Carries Over Between Sessions¶
The builder remembers the settings that describe how you work and forgets the ones that describe a particular report, so reopening it never leaves you with a half-configured form you did not build.
| Remembered | Forgotten |
|---|---|
| Your active secret key, or that you chose the temporary key | Selected licenses |
| The last category you used | Column selection, filters, sort |
| The last report you chose in each category | Row layout |
| Format, delivery, row limit, metadata preamble | Which saved report was loaded |
| Preview data and discovered columns |
The temporary key is remembered as a preference. The token itself is never stored.
Limits¶
These limits are specific to the builder:
| Limit | Value |
|---|---|
| Preview rows | 5 |
| Recommended column count | 16 (a warning, not a limit) |
| Column discovery sample | 20 rows |
| Saved reports per account | 100 |
Limits on licenses, rows, includes and time, and what to do when you exceed one, are covered in Limits and Troubleshooting.
Next Steps¶
- Go back to the form in Configuring a Report.
- Keep a spreadsheet live with Spreadsheet Sync.
- If a report fails, match the message in Limits and Troubleshooting.