The BrightWork Reporter SQL Server Feed allows you to use the reporting engine of BrightWork Reporter to extract information from BrightWork and/or SharePoint and feed it to a Microsoft SQL Server Reporting Services database.
The purpose of this is to allow work on large volumes of data in an environment that is built for reporting on volume data. This document assumes that you have a database and a table ready to export to.
This document is intended for administrators with XML and SQL Server Database experience.
The BrightWork Reporter SQL Server Feed uses ExportReportToDb.exe, a manifest XML file and a .cmd file that can be ran at a specific time by Windows Task Scheduler.
To use the BrightWork Reporter SQL Server Feed you must:
You should create a folder structure to store the BrightWork Reporter SQL Server Feed files that you will be working with.
Note: Files in these folders will not be impacted by upgrading or reinstalling BrightWork Reporter or BrightWork.
To create the folder structure:
The Manifest XML file is where:
A sample manifest file is included at:
The Manifest XML file consists of a header, footer and 2 nodes:
Every manifest XML file must have the below header and footer.
<?xml version="1.0" encoding="utf-8" ?>
<CubeFeedManifest xmlns="http://schemas.brightwork.com/CubeFeedManifest/v2">
</CubeFeedManifest>
The SourceData 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.
Nodes and Attributes |
Description |
<SourceData type="webPart"> |
This is where you specify a specific web part on a specific page. |
<webPart pageUrl=
|
You must specify the URL of the page the BrightWork Reporter web part is installed on. |
webPartId="d13b1737-3ded-464d-8cf8-b7ab0eedcd37" /> |
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. |
</SourceData> |
This is the closing tag for the SourceData node. |
Nodes and Attributes |
Description |
<SourceData type="QueryFile"> |
This is where you point the BrightWork Reporter SQL Server Feed 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 site BrightWork Reporter is running in. BrightWork Reporter does not actually have to be added to a site; however, so that it can have a context for generating the report you must specify the URL of a site. |
</SourceData> |
This is the closing tag for the SourceData node. |
The Target Data node is for specifying what columns data should be exported from, where the data should be exported to and how it should be exported.
Nodes and Attributes |
Description |
<TargetData |
This is the opening tag for the TargetData node. |
connection=" " |
Update the connection attribute to specify the SQL Server connection string to be used. Note: If the connection string includes quotation marks (???) they should be replaced with " in the Manifest XML file. Sample connection strings include:
|
tableName="Table Name" |
Update the tableName attribute to the name of the table in your SQL database that you want to map to. |
clearTable="true"> |
Set the clearTable attribute to be true if you want to delete the data stored in the table every time the SQL Server Feed is ran. Note: The default setting is false. |
<ColumnMappings> |
The ColumnMappings section specifies the mapping between the columns in the BrightWork Reporter Datatable and the Datatable in the SQL server database. Note: Non-field values may also be exported if required. Use the below mappings:
|
<Column sourceName=
|
The sourceName attribute should be set to the DataTable column name used in the Report Definition file. |
targetName=
|
The targetName attribute should be set to the corresponding table column name in the SQL database. |
</ColumnMappings> |
This is the closing tag for the ColumnMappings section. |
</TargetData> |
This is the closing tag for the TargetData node. |
The command file is the file you tell the Windows Task Scheduler to run. It tells the BrightWork Reporter SQL Server Feed application (ExportReportToDb.exe) which Manifest XML file(s) to run and where to save the Log file(s).
Note: The examples used in this section presume the folder structure was created as set out in Create Folder Structure.
To create a command file:
Note: ExportReportToDb.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\ExportReportToDb.exe -m ..\ExportReportToDb\Report1.xml > ..\ReportLogs\ExportReport1.log
..\bin\ExportReportToDb.exe -m ..\ExportReportToDb\Report2.xml > ..\ReportLogs\ExportReport2.log
..\bin\ExportReportToDb.exe -m ..\ExportReportToDb\Report3.xml > ..\ReportLogs\ExportReport3.log
..\bin\ExportReportToDb.exe -m ..\ExportReportToDb\Report4.xml > ..\ReportLogs\ExportReport4.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:
wpGUID=6ee19d6f-4ba8-4799-bda5-dc9c87bee158
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