Browse
Tools
Categories

Scheduling Reports for Hosted Clients

Reference Number: AA-00324 Views: 1081 Last Updated: 09-19-2022 01:03 PM 0 Rating/ Voters

This article explains how to create scheduled reports that can be run against a Hosted Client database.  

Overview    

Netaphor SiteAudit™ Hosted administrators maintain databases for multiple clients.  It is the administrator’s responsibility to configure discovery and other information for the client databases, including generating scheduled reports.  For example, it may be the administrator’s desire to run a monthly report for each Hosted database to get an overview of the print costs for the month.  This document explains how to create scheduled reports to run against any of the Hosted databases under the administrator purview. 

Creating the Report Template

Prior to scheduling a report, it is necessary to configure the view in the SiteAudit Viewer to show the information you want to exist in the report.  All views in SiteAudit can be customized and reports can be generated in any of several formats including HTML, XLS, RTF, PDF, and other formats.  In addition, one can include email or archival information that indicates who will receive the report and/or where the report will be archived when the report template is executed.  Please refer to the following knowledge base articles that explain how to customize SiteAudit views and reports, and how to schedule reports using the Windows Task Scheduler.

The Task Scheduler Command for Scheduling Reports for Hosted Databases

The knowledge base articles referenced in the prior section explain how to customize a view and schedule it for periodic email delivery to recipients or archival to the local file system.  However, scheduling a report for a Hosted database requires an additional argument that identifies which Hosted database the scheduled report will be run against. If the Hosted database is not explicitly defined, then the report will be run against the database that is loaded in the SiteAudit Viewer.  To specify a particular Hosted database, it is necessary to include the name of the key file in the Windows Task Scheduler command.  This is explained in subsequent sections of this document.  

Netaphor SiteAudit™ Hosted DCF File

SiteAudit Hosted use a DCF file to access customer data in an unattended fashion, such as is done when scheduling reports. The DCF file is created on the machine where it is used for security purposes. This file cannot be transferred and used on other machines. The DCF file is created from the SiteAudit Control Panel > Administration. 

What is required to Schedule a Report?

The Hosted administrator must have a Viewer that is licensed for hosted administration.  It is not possible to load firewall friendly key files in Viewers that are not properly licensed.

Two files are required when scheduling a report for a Hosted database.   The .view file template, which is the report template created from the SiteAudit Viewer.  The .view file contains information about the report, which recipients should receive it, and where the report should be archived, if specified. 

The second file required is a scheduled report DCF file that is generated by the Hosted administrator.  This DCF file is used only for scheduling reports.   

The application that executes and generates a scheduled report is called SiteAuditScheduledReports.exe and is located in the root of the default installation folder.  This application is required to generate the scheduled report.  The following sections explain how to schedule a report using Microsoft Windows Task Scheduler.  

Hosted Administrator Process for Scheduling a Report for Hosted Clients

The following describes the process that a Hosted administrator follows when generating a scheduled report for one or more Hosted Clients.

  • Create a DCF file containing a list of customers for whom a report will be generated
  • Customize a SiteAudit view, which becomes the template for the report
    • Enter 

Using Windows Task Scheduler to Generate Reports

This section describes how to schedule reports using the Windows Task Scheduler.  Three files are required when creating a task to run a SiteAudit Hosted scheduled report.

1.      The application file that is used to generate scheduled reports is located in the SiteAudit installation root folder.  
"C:\Program Files\Netaphor\SiteAudit\SiteAuditScheduledReports.exe"

2.      The.view file, which is the template created from a SiteAudit view.  This file must contain the email recipient information and/or the archival information so that SiteAudit knows what to do with the report it generates.  The .view file should be saved in a known location as the entire path and file name are needed when scheduling the task.
"C:\Users\Public\Documents\Netaphor\SiteAudit\MyReports\Inventory.view"

3.      The DCF file contains the information needed to access the hosted customer for which the report is generated.
Version 7.0 and later: "C:\Sample Folder\MyDCFFile.sadcf"

Full Path and File Name Required

The full path and file name is required for all of the files mentioned above and this must be placed inside quotes if any spaces exist in the path or file name.  If the .view file or the key file reside in the same folder as the SiteAuditScheduledReports.exe application, then it is not necessary to include the path for these files.

The first step to create a scheduled report is to launch the Microsoft Windows Task Scheduler and create a new task.  When a new task is created, the following dialog is shown. 

Enter a Name for the task.  This name is shown in the main Task Scheduler menu and should easily identify what the report is or what it contains.  In this example, we are creating a monthly inventory report for CustomerX. 

Enter a description that helps to identify the type of report that will be generated. 

Select Run with highest privileges.  

Create a new trigger.  The trigger identifies when or how frequently the report will be run. In this case, we want the report to be generated on the last day of each month.


After defining the trigger, it is necessary to tell the Task Scheduler what task it should run.  This is done by creating a new Action. This is the most important part of creating the task as this is where the view file and key file are specified.

In the Action dropdown, be sure that Start a program is selected.  This should be selected by default. 


 

In the Program/script textbox, enter the full path and filename for the SiteAuditScheduledReports.exe, which is located in the default root folder where SiteAudit was installed. This is typically, C:\ProgramFiles\Netaphor\SiteAudit.  Remember to include quotations around the full path and filename when spaces exist. 

Next, it is necessary to enter the path and file name for the .view file and the key file that points to the Hosted database. The–viewfile and –keyfile arguments are a required part of the command and must precede the path and filename.  For example: 

Version 7.0 and later: -viewfile "C:\myreports\inventory.view" -keyfile "C:\customers\mycustomers.sadcf"

Once this is complete, the task can be saved and run to confirm that the expected report is generated and delivered to the correct recipients and/or archived to the file system.


SMTP Email Server Configuration

The SiteAudit report Delivery Options includes the option to email a report or archive it to the file system.  In order to email a report, the SMTP email server must be properly configured.  It is required to configure the SMTP server on the Hosted client database and the SMTP server MUST BE ACCESSIBLE from the location where the scheduled report is run.  It is possible to use third party SMTP servers such as Gmail or Yahoo.


Deliver Mail Via Web Service

The mail service can be used in environments where no local mail server exists and a third party mail server is not an option.  To use the mail service option, simply select Deliver mail via web service as shown below


SMTP Server Configuration for Scheduled Reports

To receive email notifications or to email scheduled reports, it is necessary to configure the SMTP server on the Hosted client database.  The SMTP server must be accessible from the location where the scheduled report is run.