Data Sources establish the connection between Exago and a database or a web service. Although typically only one database is used, Exago can join data from different sources into a single report.
Note: To utilize some types of data sources you may need to download and install the appropriate driver. Refer to Data Source Drivers below.
Creating, Editing or Deleting Data Sources
All existing data sources are listed in the Admin Console's Main Menu under Data. All the sources you are adding or editing will be displayed in the Data > Sources tab.
- To add a new data source click Sources in the Main Menu then click the Add
icon.
- To edit a data source either double click it or select the data source and click the Edit
icon.
- To delete a data source select it and click the Delete
icon.
- Click the Test Connection
icon to verify the connection succeeds.
- To save changes click the Okay or Apply button.
Each data source must have the following:
Name
A name for the data source.
Type
The type of source being used. Valid types include:
- Relational databases
- SQL Server — Micrsoft SQL Server
- MySQL
- Oracle
- Postgres — PostgreSQL
- DB2 — IBM db2
- Informix — IBM Informix
- ODBC — ODBC Driver
- Non-relational databases
- MongoDB (v2018.2+)
- ElasticSearch (v2018.2+) — ElasticSearch/ELK database (For more information see CData Drivers.)
- Data warehouses
- Redshift (v2019.1.11+)
- Snowflake (v2019.1.9+)
- Other
- File — XML or Excel file (For more information see Excel and XML Files.)
- .NET Assembly — .NET Assembly DLL (For more information see .NET Assemblies.)
- SOAP Web Service — Web Service (For more information see Web Services.)
- MS OLAP — OLAP (For more information OLAP and MDX Queries.)
Schema/Owner Name (blank for default)
Provide a default database schema for the data source.
Note: Only use this if you are using schema to provide Multi-Tenant security. For more details see Multi-Tenant Environment Integration.
Connection String
The method that is used to connect to the data source. Connection strings vary by type:
Type | Connection Strings |
---|---|
mssql, oracle, postgres, mysql and olap | Refer to connectionstrings.com for database connection strings. |
websvc | Required parameters:
|
assembly | Required parameters:
|
file | Requires the physical path to the Excel or XML file and the file type. Example: File=C:\example.xls;Type=excel; |
mongodb | For more information see CData Drivers |
elasticsearch | For more information see CData Drivers |
snowflake | For more information see CData Drivers |
redshift | For more information see CData Drivers |
- Click the Test Connection
icon to verify the connection succeeds.
- Click the Make Connection String Visible
or Connection String Hide
icons to show/hide the connection string in the Data Source tab.
Data Source Drivers
Below is a list and the associated links for recommended ADO.NET drivers for each type of data source.
- SQL Server
- No external ADO.NET driver needed
- Oracle
- ODAC1120320_x64 or newer
- Oracle ODAC Connector
- MySQL/MariaDB
- dcmysqlfree.exe
- Devart Connector
- PostgreSQL
- dcpostgresqlfree.exe
- Devart Connector
- DB2/Informix
- 5.exe or newer
- IBM Data Server Driver Package
- Elasticsearch, Redshift, Snowflake, MongoDB
Web Services and .NET Assemblies
Web Services and .NET Assemblies can be used as data sources. This is possible when the Web Service and .NET Assemblies underlying methods are setup as data objects.
An advantage of doing this is being able to use high-level language to manipulate the data being reported on at run-time. The main disadvantage is not being able to take advantage of the database to perform joins with other data objects; data from methods can still be joined, but the work to do this is done within Exago. For more information see Note about Cross Source Joins.
Parameters
Parameters are passed from Exago to Web Services and .NET Assemblies. Three types of parameters can be passed but only Call Type is required.
Call Type (required)
Integer that specifies what Exago needs at the time of the call. There are three possible values. You may specify the name of this parameter in the Programmable Object Settings of the General section.
- 0 : Schema - returns a DataSet with no rows.
- 1 : Data - returns a full DataSet.
- 2 : Filter Dropdown Values – returns data for the filter dropdown list. The Data Field being requested is passed in the column parameter. The filter type is passed in the filter parameter (see below).
Column, Filter and Sort Strings (optional)
To optimize performance Exago can pass user-specified sorts and filters to the Web Service or .NET Assembly. This process reduces the amount of data sent to Exago. If these parameters are not used, all of the data will be sent to Exago to sort and filter. Column, filter and sort strings are sent as standard SQL. You may specify the name of these parameters in the Programmable Object Settings of the General section.
Custom Parameter Values (optional)
Additional parameters can be specified to be sent to individual methods in the Data Object Menu.
Important: When a Web Service or .NET Assembly is first accessed it is compiled and kept in an internal cache within Exago. This is done in order to increase performance. Due to this internal cache, Exago will not be aware of any changes within the Web Service or .NET Assembly. If the service or assembly is subsequently changed, Exago will execute the prior compiled version. Thus, when you modify the Web Service or .NET Assembly reset the internal cache of Exago by clicking the connection verification icon of the Data Source or by restarting IIS.
Note: If an Exago .NET API application needs to access reports, which use an assembly data source. It must include a reference to the assembly WebReportsAsmi.dll.
SessionInfo (optional) (v2016.2+)
Session state variables. See SessionInfo for more information.
.NET Assemblies
It is important to note that when a connection string for .NET Assembly is set the class name must match the name of the class where the static methods will be searched. UNC or absolute paths may be used. Make sure that the assembly has read privileges for the IIS user running Exago. Below is an example of a .NET Assembly connection string:
assembly=\\MyServerName\MyShareName\MyAssembly.dll;class=Main
.NET Assembly methods must be static. Below is an example of a .NET Assembly method.
public class Main { public static DataSet dotnet_optionees(int callType, string columnStr, string filterStr, int myCustomParameter) { switch (callType) { case 0: // return schema case 1: // return data case 2: // return filter values for dropdown } } }
Method signature using SessionInfo (v2016.2+):
public class Main { public static DataSet dotnet_optionees(WebReports.Api.Common.SessionInfo sessionInfo, int callType, string columnStr, string filterStr, int myCustomParameter) { switch (callType) ... } }
Web Services
Web Services are accessed via SOAP. Below is an example of a Web Service connection string:
url=http://MyServer/MyWebService.asmx
Web services methods are similar to .NET Assembly methods with the following exceptions:
- Methods do not need to be static
- Methods must return a serialized XML string. The returned XML must follow the structure used by the C# method DataSet.GetXML. An example of XML format can be found in the following section.
Excel and XML Files
Exago can use Microsoft Excel and XML files as data sources. Remember though that Excel and XML files are not databases. Simply put, these data sources do not offer the speed, performance, or security of a real database. Using Excel and XML files is recommended only if your dataset is small or if the information is only available in this format.
Connection String
File=C:\example.xls;Type=excel;
Excel
Each worksheet in the Excel file will be read as a separate table. Each worksheet’s name will be read as the table’s title. The top row will be read as the column header, and the remaining cells will be read as the data. Do not leave any blank rows or columns.
XML
The XML document must begin with the schema. After defining the schema the data must be placed into the appropriate tags. For reference see the working example below:
<?xml version="1.0" encoding="UTF-8"?> <ExagoData> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="ExagoData"> <xs:element name="ExagoData" msdata:IsDataSet="true" msdata:UseCurrentLocale="true"> <xs:complexType> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:element name="Call"> <xs:complexType> <xs:sequence> <xs:element name="CallID" type="xs:unsignedInt" minOccurs="0" /> <xs:element name="StaffID" type="xs:string" minOccurs="0" /> <xs:element name="VehicleUsed" type="xs:unsignedInt" minOccurs="0" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="Staff"> <xs:complexType> <xs:sequence> <xs:element name="StaffID" type="xs:unsignedInt" minOccurs="0" /> <xs:element name="Rank" type="xs:string" minOccurs="0" /> <xs:element name="LastName" type="xs:string" minOccurs="0" /> <xs:element name="FirstName" type="xs:string" minOccurs="0" /> </xs:sequence> </xs:complexType> </xs:element> </xs:choice> </xs:complexType> </xs:element> </xs:schema> <Call> <CallID>890</CallID> <StaffID>134</StaffID> <VehicleUsed>12</VehicleUsed> </Call> <Call> <CallID>965</CallID> <StaffID>228</StaffID> <VehicleUsed>4</VehicleUsed> </Call> <Call> <CallID>740</CallID> <StaffID>1849</StaffID> <VehicleUsed>2</VehicleUsed> </Call> <Staff> <StaffID>134</StaffID> <Rank>Captain</Rank> <LastName>Renolyds</LastName> <FirstName>Malcom</FirstName> </Staff> <Staff> <StaffID>228</StaffID> <Rank>Lieutenant</Rank> <LastName>Brown</LastName> <FirstName>Bill</FirstName> </Staff> <Staff> <StaffID>1849</StaffID> <Rank>Sergeant</Rank> <LastName>John</LastName> <FirstName>Pepper</FirstName> </Staff> </ExagoData>
OLAP and MDX Queries
Exago can query OLAP Data Sources using MDX Queries. OLAP Data Sources and Objects are identical to a regular data base type object, with the following exceptions.
- OLAP Data Objects will always be MDX Queries written in the Custom SQL Object
- Data Objects must have Schema Access Type set to Metadata and must have Column Metadata set for all fields.
Using Azure based SSAS
In order to use an Azure based SQL Service Analytic Service Database (SSAS) you need the most up to date ADOMD.NET driver, which is available from Microsoft. Then, in order to properly configure Data Object entities through joins, the following information must be provided:
- The entity containing the primary key should be specified in the "From" section.
- The entity containing the foreign key should be specified in the "To" section.
- The IDs used in the join configuration must be included in the metadata fields and should be available in the design model.
ODBC Drivers
Exago can use ODBC drivers to connect to data sources. When connecting to an ODBC data source, an extra option will appear to set the Column Delimiters. The delimiter character depends on which type of data base you are connecting to.
Examples
MySql
'
(grave accent)
MsSql, OLAP
[]
(brackets)
DB2, Informix, Oracle, Postgres, Sqlite
"
(quotation marks)
If you don't know which delimiter character to use, contact your database administrator.
Caution: If your data objects have spaces in their names, you must set the correct delimiter in order to access the data. Otherwise, improper SQL will be generated and you will see errors or erroneous data.
CData Drivers
As of v2018.2+, Exago allows for additional data source types through CData ADO.NET drivers. For more information, see the article on CData Drivers.