How do I use Data-Driven Package Schedules for Tableau Reports in ATRS?

Unlike a Data-Driven Schedule, a Data-Driven Package will determine the data driver that is further into the schedule. A Data-Driven Package allows you to send a package of reports to an individual or group from one schedule.

How to Create a Data-Driven Package Schedule Report for Tableau Reports?

  • Go to Data-Driven Package

Data driven package bar

Data driven package general wizard

General Wizard

  • Create IN: The ATRS folder where the package is stored.
  • Package Name: The name of the package.
  • Description: Add a Description to the schedule to better identify it.
  • Keyword (optional): Enter some keywords which can be used later by [Smart Folders] to identify this schedule.

Click Next to go to the next wizard section.

Schedule Wizard

Data driven package schedule wizard

In this section, you will decide when the report will execute. There are a variety of options:

  • Daily: Run a report every day or at a frequency of days.
    • Sub options: Repeat every X Days.

Example: Run the schedule every 3 days.

Run Daily-1

  • Weekly: Run a report on a weekly time frame.
  • Sub options: Repeat every X weeks.

Example: Run the schedule every 2 Weeks.

  • On: Select the specific days of the week the schedule will run. If only once a week,select only the day of the week it will run.

Example: Run every Monday, Wednesday, and Friday.

Schedule Weekly on a Sunday

  • Week Days: Run the schedule Monday through Friday.

Run Week Days

  • Working Day: Run the schedule starting on a specific day of the month. Indicate which day of the month the schedule will run. E.G. run the schedule on the 4th working day of the month.

Run Working Day

  • Monthly: Run the schedule on a monthly time frame.
  • Use the following options: Checking this box will enable you to select frequency options such as the “last Thursday of the month.” Also you can include or exclude specific months from the schedule.

Run Monthly

  • Annual: Run the schedule every year at a specified time.

Run Annual

  • Custom Calendar: Select the custom Calendar you wish to use. You can create a new custom calendar from the menu as well. Please see [Custom Calendars] for more information.

Run Custom Calendar

  • Other: Other scheduling options.
  • Run Schedule every X Minutes, hours, days, weeks, months, years.

Run other

  • None: No scheduling is required for this item.

Run none

  • Start Date: Enter the desired starting date for the schedule. This section can be the current date (providing the schedule time has not already passed) or a date in the future.
  • End Date: If the schedule is due to end after a certain date enter that here. If the schedule is to run indefinitely, then leave it blank.
  • Schedule time: On the Next Run date, the package will run at this time.
  • Exception Calendar: Choose a calendar that will instruct the schedule to NOT run on those specified days. Please see [Custom Calendars] for more information.
  • Next to run on: The package will next run on this date.
  • Repeat Every: Rerun the package every x minutes from the scheduled time until your specified time.

For example, you can set up a daily package to run every day at 8 am, and to run every hour until 5 pm.

  • Until: After this date, there will be no automated scheduling of this package.
  • Enable this Schedule: Uncheck this option to Disable the package. Disabled packages are not deleted, but they do not execute automatically. You can re-start the automatic scheduling at a later date by checking this option again. Or right-clicking this schedule from the main screen and selecting Enable.

Click Next to continue to the next wizard section.

Building a Data Driver Wizard

values from database data driven package

  • The Data Driver is where you set up the source for data for your data driven reports. If your data source or data selection criteria changes this is where you will need to make any required changes.
  • ODBC DSN Name: Drop down and select a DSN.

We strongly recommend System DSNs so that the DSN is visible to ATRS even when the user associated with the DSN is logged off.

All communication to databases (including Access databases) is done through ODBC, so you must setup a system DSN to the database before you can use this facility.

When setting up DSNs we recommend (if possible) that you use Windows Authentication (Trusted Connection). This ensures that your username and password are not required to be stored in CRD (more secure) and overcomes a large number of security restrictions which Windows places on DSNs. When using Windows Authentication, make sure that the ATRS NT service user (or background application service user) has full rights to the database otherwise, though you will connect when you are logged in, automated scheduling will fail if the Service user has not got rights to the database.

When setting up a DSN to a SQL server, you must ensure that the "Default Database" setting is set to the database you are connecting to (Windows defaults this to "Master").

  • UserID: Enter the User ID ATRS should use to log on to the database
  • Password: Enter the password associated with the above user.
  • Connect: Click Connect to connect to the Database.
  • Select the table from the database that holds the required data. You can refine your selection query by using the simple or advanced tabs.
  • Click Parse.
  • For more information of "Get Values From Database" interface, [click here].
  • Click OK.

Data Driver Wizard

data driven package data driver wizard-2

  • Click Build to specify the data selection criteria. This will return you to the Build Data Driver tool.
  • Key Column: Select the key column for the data that is returned for the reports. The information that drives the schedule is required to have a key column so that each row in the table is uniquely identified by the value in this column. The key column is there as an identifier which is used to troubleshoot in cases where there is a problem with one of the records.
  • Group reports by email address: You can instruct ATRS to group reports that are sent to the same email address. Please note that enabling this option disables the ability to embed the reports in the email body for email destinations.
  • Merging Multiple Reports: Where the reports are grouped you can also instruct ATRS to optionally merge the output of the grouped reports into a single file (PDF and MS Excel formats only). Selecting each option will bring up the options for the output format that you can further customize.

Destination Wizard

In this section, you will decide where your schedule will be delivered. The list in the center will display the list of destinations you have added to the schedule. You can organize the various destinations’ order by clicking on the green up and down arrows.

data driven package destinations wizard

  • Add: Click here to add a destination. You have several options which are: Email, Disk, Fax, Slack, Google Drive, Google Sheets, FTP, ODBC, Printer, Sharepoint, SMS, and Dropbox.

SS Select Destination

  • Edit: Select a destination and click to edit it's properties. Or simply double-click on the destination.
  • Delete: Select a destination and click this button to delete it.
  • Import: click here to import from the list of default destinations.
  • For more information about Type of Destinations, click [here].
  • For more information about Output Formats, click [here].

Customizing the Destination

With the Data Driven Schedule, you can determine the delivery method of your report based on your data. In your table, specify the delivery method by creating a column for each delivery type (FTP, SharePoint, Email etc.). For each record specify their email, fax number, and so on.

Crystal Reports: Data Driven Example in CRD.

Tip: For email destinations, simply add a semicolon after an email address to send the same instance of the report to another email address.

  • Data driving the Report's Distribution.
  • As mentioned above, ATRS will pull delivery data from your database.
  • In this example, we will be using email addresses found in the table.
  • With Data Driven inserts, simply drag and drop the field that indicates your desired destination (email in this case).

Email insert data driven

  • Now ATRS will deliver a unique report based on a corresponding email address.

Customize Recipient Messaging

  • You can also customize the messaging the recipient receives. Using Data Driven Inserts, ATRS will automatically pull data from your table and use it to customize the subject, body or report format.

Email insert 2-1

  • Simply drag and drop fields from your table to the desired position.

For example, to customize an email greeting, type the greeting, and add the recipients name as shown above.

Click Next to continue to the next wizard section.

Reports Wizard

data driven package report wizard

A package may be created with no constituent reports and then the reports can be added later. However, you may also add reports at this stage in the wizard - and amend, delete or add some more later.

  • Run Package using Multiple threads: This allows up to 8 reports to be exported simultaneously.
  • Each report in the package can run concurrently.
  • Enable snapshots and keep them for (days): Keep a copy of the report for how many days.

System resources will be shared so this will not always mean that reports will take 1/4 the normal time.

Example: You have 4 reports. Each one takes 15 minutes to export. Using a single thread, it would take 1 hour to complete the export. Using multiple threads, you would expect it to take 15 minutes for all 4. However, the sharing of your system resources by 4 reports may result in each report taking longer than 15 minutes and the total time for 4 reports may be more than 15 minutes, but it will be less than an hour.

  • Click Add
  • Package Report Properties will appear.

Package Report Properties

Report Wizard

data driven package report wizard

  • Report Location: Select the Tableau report that needs to be scheduled. A tableau report can only be added if the ATRS server can reach the report path.
  • Report Name: Write in the name of the package.
  • Format: Select the output format for the report.

Parameters

data driven package parameters

  • In this section, you will determine the parameters for your report (if any) and select options for your subreport. If your report has no parameters, you may skip this section by clicking next.
  • There are 3 requirements in order for ATRS to detect your Tableau Report parameters and their parameter values:
  1. The parameter must be in use in the report.
  2. The parameter must be visible.
  3. The parameter must be set to be prompted at runtime.
  • If these three requirements are achieved, you should see the parameters in your report listed in this screen.
  • For each parameter, select from the drop down list the value the report must use. In a single schedule, only one parameter value can be run at a time per parameter. You can type a value into the field as well.
  • Set as Null: Set no value for this parameter.
  • Ignore: Do not run this parameter, ignore it at runtime.
  • Insert Menu: You can insert constants, formulas and database field values instead of a static "typed in" value. Right-click in the parameters field to expose the Insert menu.

To enable a report parameter to run for a date constant (Current Date, Yesterday etc.), select ATRS Constants from the insert window, then drag and drop your desired constant to the parameter field.

  • Selecting Date Parameters via Calendar: If your report contains a date parameter, you can either manually enter dates as described earlier in this topic, or select the desired date from the built in calendar. Simply click in the date parameter field to open the calendar. Select the desired date. Click OK.
  • If the parameter is also a time parameter, this can selected as well. The buttons below enable you to preview the report, adjust formulae, and review sub reports. You can re-query the report for parameters as well.
  • Formulae: View edit and Parse the Record Selection Formulae.
  • Subreports: Set parameters, authenticate, and re-query sub report parameters.
  • Preview: Shows you a preview of the report.

The preview function only works if Crystal Reports is installed on the PC.

Naming

data driven package naming

  • Default Naming Convention: ATRS will name the output file in the following format: reportname.format extension, e.g. Catalog Report.pdf.
  • Customize the output file name: Choose your own filename or right-click and use the Insert Function to insert a value.
  • Customize output extension: Choose your own extension. This is useful for system integration. For example, the default extension for a character separated file is "CSV," but you can give your export an extension of "txt" so that the file can be read by another already existing system you may have. You may also right-click and use the Insert Function to insert a value.
  • Append date/time: This is useful for the following reasons:
  • If the file name is the same each time, and it is being exported to the same folder each time, then it will be overwritten by the latest one each time. By appending date and time to the file name, each file remains unique, and no files are overwritten.
  • You can track which reports ran and when they ran by looking at what the report is named.

Exception Handling

data driven package exception handling wizard

  • Check if the Report is Blank: If a report is blank because it genuinely returned no data, recipients can misconstrue this as an error with the scheduler. This option allows you to identify genuine empty reports and instruct CRD on what to do with them.
  • Ignore the report and subsequent tasks: If the report is blank, do not send the report. The report will not be delivered to the destination. No custom tasks will be run.

Method

Blank report check method _ file size check

  • Select the Method that will determine whether a report is blank.

Blank report check method _ sql query

  • SQL Query: Select this option to use a user made query that will determine if the report is blank. If the query returns no results, the report is blank.
  • Click Build.
  • Get values from a database window will appear. 

Get values from databaes 1

Actions

Actions window

  • Select an action from the task list. This task will be executed in the event that a schedule is blank.
  • For more information about tasks, [click here].

Tip: You can send a notification if a report is considered blank instead of sending the report. Simply select “check if a report is blank” then select “Ignore the report.” In the actions tab, select “Send Email” from the list. Compose your email and save.

  • Click OK.

Exception Handling Wizard

data driven package exception handling wizard

  • Treat as “error” if not completed in X minutes: If a report takes longer than the specified amount of time to run, this option will treat the schedule as an error and follow the appropriate action. The “Auto-calculate” option instructs ATRS to automatically determine how long a schedule should take to run the report. If it takes longer than the calculated amount of time, then it is an error.

If manually determining the error timing, please double check the run time of the report in order to get the correct time estimate.

  • On error, retry executing schedule every: If set to 0, ATRS will deem the schedule as "Failed" the first time it encounters an error. The schedule will not run again until its next scheduled time. Change the value to tell ATRS how many times you want it to retry running the report before declaring it as "Failed."
  • Check if the Report is Blank: If a report is blank because it genuinely returned no data, recipients can misconstrue this as an error with the scheduler. This option allows you to identify genuine empty reports and instruct ATRS on what to do with them.
  • Ignore the report and subsequent tasks: If the report is blank, do not send the report. The report will not be delivered to the destination. No custom tasks will be run.

Method

Blank report check method _ file size check

  • Select the Method that will determine whether a report is blank.

Blank report check method _ sql query

  • SQL Query: Select this option to use a user made query that will determine if the report is blank. If the query returns no results, the report is blank.
  • Click Build.
  • Get values from a database window will appear. 

Get values from databaes 1

Actions

Actions window

  • Select an action from the task list. This task will be executed in the event that a schedule is blank.

Tip: You can send a notification if a report is considered blank instead of sending the report. Simply select “check if a report is blank” then select “Ignore the report.” In the actions tab, select “Send Email” from the list. Compose your email and save.

Click Next to continue to the next wizard section.

Custom Tasks Wizard

custom tasks data driven package

  • In the section you have the option of setting up custom tasks. Custom tasks are business process automation tools that can be auto triggered before or after a report runs.
  • If you have no desire to add a Custom Task, you can click finish to complete the schedule.

Data Driven Package Context Menu

data driven package context menu

Right-Click on a schedule to see the following actions:

  • Properties: Edit the schedule from here. Or you can just double click on the schedule.
  • Open: This will open the package and show its constituent repor
  • You can right-click on each of the constituent reports to see the context-sensitive menu shown in the picture above.
  • Enabled: Use this to enable or disable the constituent report.
  • Refresh: Pulls through changes to just that report which were made outside ATRS.
  • Rename: Renames the selected report.
  • Preview: Generates a preview of the selected report.
  • Delete: Deletes the selected report from package.
  • Properties: Displays the configuration properties of just that report.
  • Add Report: Use this to add one or more reports to an existing package.
  • Copy: Use this to copy the schedule. Right-click in the "white space" of the folder you wish to copy it to and select Paste button.
  • Rename: Rename the package.
  • Enabled: Schedules are enabled when there is a check icon beside this option. To stop a schedule from running, or to "pause" it for a while, select this option to remove the check icon. Disabled schedules will not run until they are enabled again.
  • Refresh: When a schedule is first created, ATRS caches (saves) a copy of the report. All executions of the schedule are performed using this copy. If you make changes to your master report, you must select this option in order to pull the changes into ATRS.
  • Execute: This button will execute the schedule immediately. Note that the next run date and time is not moved on as a result of a manual execution. They only move on if the schedule is run automatically by one of the schedulers.
  • Delete: Selecting this option will delete the schedule.
  • Test Package: Use this option to test the schedule and export it to selected "test" destinations.
  • Split into Single Schedules: This will split all the constituent reports in the package into Single Report Schedules.

This process will automatically delete the package once the splitting process is completed.


  • Create Shortcut: Use this option to create a shortcut you can save in any location on your PC. Execute the shortcut to execute the schedule in ATRS.

Data Driven Package Properties

properties menu data driven package

  • To access your schedule properties, right click on a schedule and select properties.
  • Similar to the schedule wizard, you adjust settings to your schedule such as timing, error handling, or custom tasks.
  • General

Data driven package general wizard

  • Schedule

Data driven package schedule wizard

  • Reports

data driven package report wizard

  • Destinations

data driven package destinations wizard

  • Exception Handling

data driven package exception handling wizard

  • Tasks

custom tasks data driven package

  • History: Review the schedule's history. Successes, failures, and other data is located here.

data driven package history window

  • Data-Driver

data driven package data driver wizard-2