The server side Email Scheduler allows you to use the Windows Task Scheduler to email the contents of a report to specific individuals, member of a web and/or Owners and Assignees of list items returned by the report.
Note: We recommend using the Reporter User Interface for easier set up of Server side Scheduled Emails.
Suggested uses for this include:
To use the server side Email Scheduler you must:
Note: This feature does not support Chart Reports or BrightWork Gantt Reports.
This procedure should only be carried out by users with administrative privileges on the server and the BrightWork site the report is running on. If the SharePoint content database exists on a server separate to the front end SharePoint server, the administrator should also have admin rights on this server.
You should ensure the SMTP server SharePoint uses to send emails (e.g. Alerts) is set up correctly. Please consult the SharePoint documentation for more information on this.
Additional configuration, such as configuring your email server to allow relaying, may be required to email data to individuals outside of the server domain.
This document is intended for BrightWork administrators with XML experience.
If you use Microsoft Visual Studio, or another software package that can validate XML, you can use the GenerateReportManifest.xsd schema file that ships with BrightWork (C:\Program Files (x86)\BrightWork\16\GenerateReport\bin).
To validate this file in Microsoft Visual Studio, add the schema file to the current solution and click on the XML menu option at the top of the screen and click Validate XML Data.
This section describes how to generate a My Work report for all the webs on a top-level BrightWork site. It will run the My Work report for every valid user in the top-level site and email each user a report detailing the work items where they are the owner or assignee.
Note: GenerateReport.exe will be automatically added to the appropriate location. Do not copy this application into the folder as it will fail.
Note: You can also run the command file on demand by double-clicking on it.
The server side Email Scheduler uses GenerateReport.exe, a manifest XML file and a command (.cmd) file that is scheduled to run a specific manifest XML file(s) by Windows Task Scheduler.
You should create a folder structure to store the Email Scheduler files that you will be working with. Files in these folders will not be affected by an upgrade.
The manifest XML file is where you specify the report to be run and who is to receive the email.
Note: BrightWork includes a number of sample manifest files for the most commonly emailed reports. We suggest using one of these files as a starting point for creating your own manifest XML file.
They are available on the Server at:
Do not edit the files in the sample manifests folder as they will be overwritten if you do an upgrade or a reinstall.
We suggest you copy and paste the file you want to use into
The sections on the manifest XML file include:
Every manifest XML file must have the below header and footer.
<?xml version="1.0" encoding="utf-8" ?>
<GenerateReportManifest xmlns="http://schemas.brightwork.com/GenerateReportManifest/v2">
</GenerateReportManifest>
The Report node is where the report that is to be run is defined. There are 2 options:
Note: For performance reasons, we recommend using the QueryFile method as opposed to the WebPart method. Another advantage of this approach is that the web part does not have to have been actually added to a web part page.
This section outlines the options available with WebPart type Report nodes.
Nodes and Attributes |
Description |
<Report type="WebPart"> |
This is where you specify a specific web part on a specific page. |
WebPart pageUrl=" //server/sites/site/Projects/default.aspx" |
You must specify the URL of the page the BrightWork Reporter web part is installed on. |
webPartId=" " /> |
You must specify the web part id - please see Identify the Web Part ID for more information on how to obtain the web part ID. |
</Report> |
This is the closing tag for the ReportType node. |
This section outlines the options available with QueryFile type Report nodes.
Nodes and Attributes |
Description |
<Report type="QueryFile"> |
This is where you point the server side Email Scheduler at a Report Definition file. |
<QueryFile fileSourceType=" " |
Specify the gallery type that the Report Definition file is stored in. There are 3 options:
|
filePath=" " |
Specify the name and location of the Report Definition file that you want to run. The information you supply here is dependent on the fileSourceType attribute. Sample file paths include:
|
scope=" " |
Specify the scope of the report you want to run, there are 3 options:
|
roothref="http://server/sites/site/Projects/mysite"
|
Here you specify the web BrightWork Reporter is running in. BrightWork Reporter does not actually have to be added to a web; however, so that it can have a context for generating the report, you must specify the URL of a web. |
</Report> |
This is the closing tag for the ReportType node. |
The Execute Report Node is where the email that is to be sent is defined.
<ExecuteReport>
|
Specifying true means that the scheduler will generate an email for all members of the web (or in the case of My Work report, all members of the web who are Owners or Assignees of list items returned by the report). The email will only be sent if the $user parameter is in the <To> node (see below). |
||
<QueryParams> |
There are two conditions whereby you must have a QueryParam.
|
||
<Email> |
Here you define the email that gets sent. |
||
<SMTPServer>
|
Enter the SMTP Server Name. |
||
<From>
|
Enter the email address of sender. |
||
<To>
|
Define the To list. The value $user is to be used if <ExecuteReport forEachUser="true"> and/or if $user has been mapped in the QueryParam as shown above. You can also specify individual email addresses: each one must be separated by a ; (semi-colon). Note: Specified email addresses will receive a copy of every email that is generated. |
||
<Subject> </Subject> |
Subject of the email. Note: For My Work reports, you can include user details in the email subject, e.g. <Subject>$User Work</Subject>. |
||
<Body> </Body>. |
Here you add any text that you want to be included in the Body of the email |
||
</Email> |
This is the closing tag for the email section. |
||
</ExecuteReport> |
This is the closing tag for the execute report node. |
The command file is the file you tell the Windows Task Scheduler to run. It in turn runs the manifest file through the GenerateReport.exe and generates a log file.
To create a command file:
Note: GenerateReport.exe will be automatically added to the appropriate location. Do not copy this application into the folder as it will fail.
The manifest XML file, the cmd file and the log file can be called anything.
The log file contains details of who ran the process, when it was run and what emails were sent and not sent.
You can have run multiple reports using the one command file, for example:
..\bin\GenerateReport.exe ..\ReportManifests\Manifest1.xml > ..\ReportLogs\EmailReport1.log
..\bin\GenerateReport.exe ..\ReportManifests\Manifest2.xml > ..\ReportLogs\EmailReport2.log
..\bin\GenerateReport.exe ..\ReportManifests\Manifest3.xml > ..\ReportLogs\EmailReport3.log
..\bin\GenerateReport.exe ..\ReportManifests\Manifest4.xml > ..\ReportLogs\EmailReport4.log
Use the Windows Task Scheduler on your server to run the command file at the desired time.
To schedule a new task
Note: You can also run the command file on demand by double-clicking on it.
For more information on the Windows Task Scheduler please consult the Windows Server help.
To identify the web part ID, follow the steps below:
Note: If the report includes Query Parameters (e.g. a My Work report), they will be appended to the end of the web part ID and will appear after the &, - this additional text is not part of the web part ID.
For example:
&CurrentUser=21