Contact UsRequest Information
SyTech ProductsWeb SupportDownloadsSyTech PartnersSyTech DistributorsAbout SyTech
 

Historical (Batch) Report

Web Published by XLReporter- click here

Overview 
This report illustrates the simplicity of applying XLReporter to a historical database.

The History (Batch) Report provided with XLReporter is an example of a history report.  The example generates a batch report from historical data stored in a historical server. The start and end time of the batch is managed by XLReporter and so the User does not need to be concerned on developing the relevant query to produce the correct data extraction. 

The entire historical reporting operation is performed automatically by XLReporter.


Historical Report

Tools are provided to generate historical reports from within Excel, if that is the requirement. The Simulation is an example of this reporting style!

Technology
The Historical Report illustrates:
Updating Sheets.
Maintaining the date and time of the reporting period.Extracting data from a historian based on specific dates.

Report Design
The design in provided in the file HistorySample.xls. 

There is one date connection to cell D7.

All the other connections are History connections which use the Date function DT019.

The DateTime (DT) function
The DT function has a number of special uses.  As a standalone entity it is used to store event times and durations which can subsequently be used in a report. In conjunction with a historical connection, it is used to store the date/time settings that determine the amount of data extracted from historical archive.

The Set command is used to set information in a DT function.  For example, Set 'DT019:Time' '12:00:00' will store 12:00:00 into the Time field of DT019 (which can be viewed using the Function Editor).

A special use of the Set command is when it is used as
Set 'DT019:Date' '{DATIM}'. This results in the current date and time to be stored in the function.  You will agree, this is ideal for latching dates of events, such as the start time of  a batch.

The Update command is also used with a DT function.  Using this command after a Set causes the Span field to be calculated from the difference of the current date/time from the date/time stored in the DT.

As an example, suppose the Set command is applied to DT019 on May 21, 2000 at 12:00:00.  Later that day at 23:15:00 the Update command is applied.  The fields of DT019 would take the following values:
Date: 05/21/00
Time: 12:00:00
Span: 00:11:15:00

Simulation
The report is provided with a pushbutton so that it can be executed interactively from within Excel; perfect for testing and presentations.  In practice, this button would not be provided in deployed solutions.

The function of the pushbutton is:
Setup: Press to enter the date and time for the report.

To simulate the report, press Setup.  Enter the date and time of interest and the press OK.  Note that the information entered updates DT019 by the VB code under the dialog.

Scheduler
To use this example in a 'real' environment, use  the workbook to HistoryMaster.xls provided in the XLReporter installation.

A schedule has been provided for the History.sch. In practice, this would be used to automate the report generation, automatically and in the background.

The schedule can be tested by using the Execute feature of the Scheduler designer. Load the configuration into the Schedule Designer, select the line to execute, right click and select Execute.

The configuration uses Event Based schedules.

The schedule is controlled by a tag from the process;
BatchStart: Digital that is set when the batch is started.


At the start of a Batch:
When BatchStart is set,
- copy contents of BatchID to the register RG001.
- create a new workbook from HistoryMaster.xls and name it after the Batch ID held in the Cval field of register RG001.
- Set DT001 with the date and time when the batch started.

At the end of a Batch:
When BatchStart is cleared,
- update DT001 so that the Span is calculated.
- update the Report in the workbook.

For applications that require multiple batches to be in production simultaneously, the above schedule would need to be replicated.

x

x

x

x

x

x

x

x

x

x

x

x

x

x

x

© 2006 SyTech, Inc. All Rights Reserved.