Export a Report or Label

This guide will teach you how to export a report or label and share it with Specify Support or another user.

Exporting a Report or Label

  1. Click on to the Reports :reports_: item in the navigation menu.

  2. Click the :pencil_: (Edit) icon on the line of the report/label you wish to export

  3. Click the Download button in the top right of the App Resources editor.

    Make sure to save the downloaded JRXML file somewhere safe. This is half of your report/label definition!

  4. Copy the App Resource ID: Now copy the URL of the webpage that shows the XML contents of your report or label.

    https://sp7demofish.specifycloud.org/specify/resources/app-resource/40/

    Copy the app resource ID from the end of the URL (in this case, it is 40).

    So we can find the query associated with the report, we will need to use the API.

  5. Construct URL to find the report record: Using the same base URL for our instance (e.g. https://sp7demofish.specifycloud.org/), we need to add /api/specify/spreport/?appresource= to the address bar and then append the ID for our report/label app resource (in this case, 40).

    Formula: <base_url> + api/specify/spreport/?appresource= + <app_resource_id>

    Example: https://sp7demofish.specifycloud.org/api/specify/spreport/?appresource=40

  6. Find the associated query: Go to the URL we constructed in the previous step and see this output in JSON:

    {
      "objects": [
        {
          "id": 16,
          "name": "Fish Gift Report",
          "remarks": "",
          "repeatcount": null,
          "repeatfield": null,
          "timestampcreated": "2012-12-11T16:03:49",
          "timestampmodified": "2012-12-11T16:03:49",
          "version": 1,
          "workbenchTemplate": null,
          "appresource": "/api/specify/spappresource/40/",
          "createdbyagent": "/api/specify/agent/2151/",
          "modifiedbyagent": null,
          "query": "/api/specify/spquery/17/",
          "specifyuser": "/api/specify/specifyuser/2/",
          "resource_uri": "/api/specify/spreport/16/"
        }
      ],
      "meta": {
        "limit": 20,
        "offset": 0,
        "total_count": 1
      }
    }
    
    • On the query line, we can see which query we need to export.

      • Our query has an ID of 17 (based on /api/specify/spquery/17/)
    • On the specifyuser line, we can see which Specify user owns the query associated with the report. This user is the only one who can modify the query!

  7. Now we will need to navigate to the query itself so we can export it as well. Take the base URL (e.g. https://sp7demofish.specifycloud.org/) and append specify/query/ followed by the query ID (17):

    https://sp7demofish.specifycloud.org/specify/query/17/

  8. Click the :pencil_: (Edit) icon to the right of the query name and then click Export.

    A JSON file will be downloaded. This contains the query definition.

Sharing Your Report or Label

To send a copy of your report or label, you need to send both items exported in the steps outlined above:

Now you can freely share these files, and the report and query can be recreated in other collections or databases. They can even be used to create a duplicate of an existing report.