DataSources allows you to specify the connections the report's DataSets will have access to. The DataSources property dialog configures the DataSources available to the report.
Overview Data sources are configurable within the RDL Project. The RdlEngineConfig.xml file controls which data sources are available for building and running reports. The data sources listed below are available depending on whether you've installed the proper drivers for each database or external data source.
SQL Server Data Source SQL Server support is built-in to the RDL Engine.
ODBC ODBC support is built-in to the RDL Engine. Configure your ODBC sources using the Control Panel / Administrative Tools / Data Sources (ODBC) dialog. When you create a new report and pick ODBC as the Connection type you'll be presented with a list of available data sources.
OLE-DB ODBC support is built-in to the RDL Engine.
MySQL MySqL has been tested using both the .Net driver available from the MySQL site or the ODBC driver.
FireBird FireBird has been tested using the .Net driver available from the FireBird web site.
Web Services The Web Service data source takes an URL/File parameter to a WSDL file. (See www.xmethods.net for lists of web services, though I've had mixed results with some of them.) The WSDL file is used to dynamically generate a compiled proxy class when the web service is first used. The assembly containing the proxy is cached so that subsequant requests don't need to regenerate and compile the proxy. Access to web services are available to the RDL Project via the DataProviders.dll module.
XML The XML data source reads in XML files and flattens them into a row depending on your command syntax. See RssShort.rdl for example reading an RSS XML news feed from Yahoo!. Access to XML data sources are available to the RDL Project via the DataProviders.dll module.
For example, the following could be used as a connection string to a RSS web file.
Url=http://rss.news.yahoo.com/rss/us;RowsXPath=rss/channel/item; ColumnsXPath=title,link,pubDate,description,../title,../copyright, ../image/url,../image/width,../image/height,../link
- defines the location of the XML file.
- defines the xpath from the top of the XML document to the rows.
- defines the xpaths of the columns of the XML document. If not specified then the child elements and attributes of the first row will be used as the column definitions.
Web Logs The Web Log data source reads web log files (typically .log files). Example WebLogHitCount.rdl shows how this may be used but you'll need to change the file name to one of your own log files. There are three parameters you can specify either in the command text or as query parameters:
- specifies the location of the log files. This can be a list of files separated by a blank space.
- specifies the primary domain of the web site.
- specifies the name of the main index file.
Access to web log (standard log format files) are available to the RDL Project via the DataProviders.dll module.
Text Files The Text data source reads in text files. Based on the separator parameter (or if omitted the file extension; e.g. ',' for .csv) the file is parsed into rows and columns. The following parameters are supported within the command string.
- specifies the location of the file.
- specifies the column separator character. .txt default to the tab character. .csv files default to ','.
- indicates whether the first row of the file contains the column headers.
File Directory The File Directory data source reads the directory information and creates rows with directory names and file names. The hierarchy is maintained by assigning IDs to all rows with the ParentID of the directory that contains it. Example FileDirectoryTest.rdl should work on your machine without changes. The parameters are provided to the Data Provider by report parameters. Access to file directories as a data source are available to the RDL Project via the DataProviders.dll module.
SQL Anywhere The ADO.NET driver for Sybase iAnyWhere is listed in the sample RdlEngineConfig.xml file.