---
title: "Download Subscriptions Quick Guide"
canonical: "https://servicedesk.maxgeo.com/space/DS/1562542083/Download%20Subscriptions%20Quick%20Guide"
format: markdown
---
|  |  |  |  |
| --- | --- | --- | --- |
| Application: | DataShed | Build Number: | 3.0 or newer |

---

 

> Macro (toc)

# **Introduction **

DataShed5 Download Subscriptions are a powerful tool for automatically supplying data and information to users on a scheduled basis. Subscriptions can be created to export data in different file formats such as Access, Excel, CSV. Download Subscriptions can also be created to send DataShed5 reports. These can then be supplied directly to users via email or can be accessed from a network file folder. 

> 📝 **NOTE:** If you have multiple Download Subscriptions, you must create separate Layouts for each Subscription. This is necessary because all Download Subscriptions run simultaneously. If two or more Subscriptions use the same Layouts, it can lead to contention and may result in errors.


# **Creating a Report Subscription **

To create a Report Subscription: 

1. Navigate to the Download Subscription section in the details for your Database in DataShed5 Administration.
  Navigate to the Download Subscription section in the details for your Database in DataShed5 Administration.

2. Choose +Subscription and complete the details
  

3. Complete the parameters for your report.

> ℹ️ HINT - to determine the correct parameters needed; first run the report in DataShed5, note the parameters used to produce the report then transfer these to the Download Subscription Parameters.

![Download Subscription - Step 30 (1).png](media://53cea2ba-edf5-43f9-a6f3-12a970089e6c)


4. Click on the Add/Edit Parameters button for you newly created report and then click on +Add Subscription Parameter.

5. Choose a parameter from the Parameter Criteria dropdown and then choose Parameter Type.

- DatePeriod will allow you to use predefined periods such as Last Quarter or Month to Date

- Value will allow you to input a particular value such as an Element or Units

- SQL will allow you to enter T-SQL script that will return values to be used.


Examples of SQL script include 

<u>Date From</u> - This will enter the date of the first day of the previous month. 

```sql
SELECT DATEADD(DAY, 1, EOMONTH(DATEADD(MONTH, -2, GETDATE()))) 
```

<u>Date To</u> - This will enter today’s date. 

```sql
SELECT GETDATE () 
```

<u>DataSets </u>- This will select data from all active DataSets. 

Note: All DataSets can ONLY be selected for the “Assay Summary” report. No other report supports multiple DataSet selection.

```sql
SELECT DATASET FROM tblSYSDataSet WHERE ISCURRENT = 1
```

 Lab Code - This will select data from all batches with LabCode beginning with BVM 

```sql
SELECT DISTINCT LabCode FROM tblSYSAssBatch WHERE LabCode LIKE 'BVM%' 
```


# **Creating an Export Subscription **

To create an Export Subscription 

1. Navigate to the Download Subscription section in the details for your Database in DataShed5 Administration.

2. Choose +Subscription and complete the details

Source Types available are Table, Layout and Scheme. 

![image-20250123-024926.png](media://89d03fe0-b453-4968-8075-0067f714f0f4)

3. Complete the filter for your export.

HINT - to determine the correct filter needed; first run the export in DataShed5, note the filter used to produce the desired export then transfer these to the Download Subscription Parameters. 

4. Click on the Add/Edit Parameters button for you newly created report and then click on +Add Subscription Parameter.

5. Choose a filter type from the Filter Type Criteria dropdown.

6. Choose a Column Name to be filtered.

7. Select a Criteria

8. Add the Criteria Value

9. Multi-level filters can be created using the Add Criteria OR/AND buttons.

10. Advanced SQL can be used to create more complex select statements. eg - 

```
(tblDHColl.[DataSet] = 'DEEXP' ) AND (tblDHColl.[Hole_Type] = 'DD' ) 
```


If you have any questions on this or any other topic, please contact your local office or via our [Customer Portal](https://maxgeo.atlassian.net/servicedesk/customer/portals).