Getting Started #
You can load existing SQL Statements as Reports in TAD. This allows you to modify and download data using TAD which is faster than opening SSMS to get data.
A sample SQL Statement is provided at the bottom of this article using the TAD Sandbox table which all users will have access to by default.
Loading a Report #
Click the Add Report button on the left side of the ribbon.

Click the Query button on the left side.

Paste the SQL Statement in the SQL Statement field.
Click the Load Report button.

The following message will appear.

The SQL Statement field will be updated with just the SQL Statement and the various parts on the left side will be populated.

Change the Tab Name if you want.
Click the Download Changes button.

If you’re using the sample SQL Statement or one with parameters then you will see the TAD Parameters form.
Click the Download button.

You will see the data for your Report.

HQ Company Join #
If you have Company data security active in Vista then the HQCO table needs to be included in every SQL Statement. If the SQL Statement you load does not contain the HQCO table then it will automatically be added.
The statement below does not contain the HQCO table.

When you click the Load Report button you will receive the message below.

The statement below now contains the HQCO table.

Sample SQL Statement #
You can use the code below to load the TAD Sandbox as a Report.
/*Report:0;LT:TABLE;CF:4;C1:0,C2:0,C3:@,C4:#,###,###,##0.00!@#$%^&*(;CST:4;TS:TableStyleMedium2;HS:TADHeaderStyle;*/
/*Package:Download*/
/*Parameters:(Companies):udTADSandbox.Co*/
DECLARE @(Companies) varchar(100); SET @(Companies)=''
SELECT udTADSandbox.Co, udTADSandbox.Seq, udTADSandbox.State, udTADSandbox.BudgetAmt
FROM udTADSandbox
INNER JOIN HQCO HQCompany ON udTADSandbox.Co=HQCompany.HQCo
WHERE (udTADSandbox.Co IN (@(Companies)) OR LEN(@(Companies))=0)