===============================================================
Using CHARTrunner to Fetch Chart Data from an ADO XML Recordset
===============================================================

CHARTrunner 2.0 and higher support fetching chart data from a data source
that returns an ADO XML recordset. This technique allows CHARTrunner to 
chart data from servers that are accessible to you on your company intranet
or from servers on the public internet. 

The ADO XML Recordset sample charts are:

XML Recordset Example 1.crf - Charts data from an XML recordset that was
   saved to a file that is returned by a web server. The XML data is fetched
   via the HTTP protocol. CHARTrunner also supports the HTTPS protocol if
   the security of your data is important.

XML Recordset Example 2.crf - Charts data from an XML recordset that was
   saved to a file that is returned by an FTP server. The XML data is fetched
   via the FTP protocol.

XML Recordset Example 3.crf - Charts data from an XML recordset that is
   dynamically generated by an ASP web page.

XML Recordset Example 4.crf - Charts data from an XML recordset that is
   dynamically generated by an ASP web page. This web page also supports
   query parameters.  When the chart is drawn CHARTrunner prompts you to
   specify the query parameters.

You can copy these chart definitions into an existing CHARTrunner working 
folder, or you can set CHARTrunner's "working folder" to the folder where
these sample charts are located.

The "CrWeb" sub-folder contains the ASP web pages (GetXmlRecordset1.asp and
GetXmlRecordset2.asp) that are used by the "XML Recordset Example 3" and 
"XML Recordset Example 4" charts. These ASP web pages dynamically fetch the 
desired chart data from an Access database on the web server and return the 
requested data as an ADO XML recordset. You can use these ASP web pages as a 
starting point to create your own ASP or ASP.NET web pages that return "your" 
data to CHARTrunner as an XML recordset.

The "CrWeb\Data" sub-folder contains the Data1.xml data file that is used by
the "XML Recordset Example 1" and "XML Recordset Example 2" charts. Data1.xml 
is an example of persisting an ADO recordset as an XML recordset that is
saved to a disk file.

More Information
----------------

ADO stands for ActiveX Data Objects. This is a Microsoft standard that many 
software vendors support as a way to provide access to their application data. 
CHARTrunner uses ADO to connect to many different types of data sources such
as Microsoft Access, SQL Server, Oracle, etc. CHARTrunner does not currently 
support an XML recordset generated by ADO.NET, you must use "classic" ADO. 

An ADO recordset may be saved (or persisted) as an XML recordset, and an XML 
recordset can be "read" by ADO and turned back into a standard ADO recordset. 
XML stands for Extensible Markup Language.

An XML recordset saved as an XML file is simply a text file that contains
all the information about the data source, such as column names, column types, 
and all the data values from the rows and columns of the recordset.

CHARTrunner 2.0 and above allows you to use an XML recordset as the data source 
for a chart by selecting "ADO; XML recordset" as the Type on the Data source tab 
of the chart definition. You enter the URL that will be used to fetch the 
XML recordset as a "Custom query" on the Data definition tab. For example, the 
following URL, which may be entered into Internet Explorer, simply returns the 
file Data1.xml, which is a persisted ADO XML recordset:

http://demo.chartrunner.com/CrWeb/Data/Data1.xml

You can use a web server (HTTP or HTTPS) or an FTP server, and
CHARTrunner will fetch the XML recordset via the internet (or your intranet) and 
draw a chart based on the data contained in the XML recordset.

Here are some possible scenarios of how XML recordsets could be used
with CHARTrunner.

** Periodically update XML recordset files on a server - In this scenario
you would periodically update one or more XML recordset files on the server 
so that the files contain the most recent data available. You could periodically, 
as a "scheduled task", run a script that updates the XML recordset files. The 
Data1.xml file is an example of what an ADO XML recordset file looks like.

** Dynamically generate the XML recordset - In this scenario you would use an 
ASP or ASP.NET web page to fetch the chart data, persist the ADO recordset as an
XML stream, and return the XML recordset to CHARTrunner. This method allows you 
to pass query parameters to the URL so that you could, for example, only fetch
data between specific starting and ending dates. If you turn "Prompt for 
parameters" on in the chart definition, then CHARTrunner would prompt you to 
enter the query parameters, such as starting and ending dates, before it 
fetches the data and draws the chart. The ASP web pages GetXmlRecordset1.asp 
and GetXmlRecordset2.asp demonstrate how to dynamically generate the XML recordset.

The most recent version of this document along with the sample charts and other
files can be downloaded from the following URL: 

http://www.chartrunner.com/webdata/cr_xml_recordset.zip
