BI Dashboard & Reporting — New SAP HANA Data Source (v22.2)

Reporting Team Blog
26 December 2022

As you may already know, our BI Dashboard and Reporting platform can retrieve data from numerous different data sources.

Our next major update (v22.2), will add support for a new SQL provider - SAP HANA (High-performance ANalytic Appliance). SAP HANA is a multi-model database system that stores data in column-based tables within memory instead of retaining it on disk. It combines online analytical processing (OLAP) with online transactional processing (OLTP). This implementation improves performance and allow you to process massive amounts of data with near-zero latency.

Our new SAP HANA data provider is available in both the DevExpress Report Data Source Wizard and our Dashboard Designers.

SAP HANA Data Access

To establish a connection to a SAP HANA database, install the SAP Hana Client 2.0 on the client machine.

For .NET apps, you’ll also need to add a reference to Sap.Data.Hana.Core.v2.1.dll.

Once complete, you can connect to the database via the Data Source Wizard or in code.

Data Source Wizard

Select Database on the first page of the Data Source Wizard.

Once you’ve selected our SAP HANA data provider, you’ll need to specify connection settings:

SAP HANA supports tenant databases. If you do not specify the `Database` parameter, the system database is used by default.

After data source configuration, the wizard creates a SQLDataSource or DashboardSQLDataSource component to represent the data source and associated SAP HANA settings.

Please review the following configuration help topics for more information on connection parameters and data retrieval options:

Runtime

If you wish to connect to a SAP HANA database from code, create a SQLDataSource or DashboardSQLDataSource object, specify HanaConnectionParameters, and retrieve data as needs dictate.

The following code snippet supplies the dashboard with data from a SAP HANA database:


using DevExpress.DataAccess.Sql;
using DevExpress.DashboardCommon;
using DevExpress.DataAccess.ConnectionParameters;

public partial class Form1 : Form {
        public Form1() {
            InitializeComponent();
            HanaConnectionParameters hanaParams = new HanaConnectionParameters();
            hanaParams.ServerName = "hxehost";
            hanaParams.PortNumber = 39015;
            hanaParams.UserName = "SYSTEM";
            hanaParams.Password = "17Me7P7n4";

            DashboardSqlDataSource sqlDataSource = 
            new DashboardSqlDataSource("Data Source 1", hanaParams);
            SelectQuery selectQuery = SelectQueryFluentBuilder
                .AddTable("Northwind.Order Details")
                .SelectColumns("UnitPrice", "OrderID", "Quantity")
                .Build("Query 1");
            sqlDataSource.Queries.Add(selectQuery);
            sqlDataSource.Fill();
            dashboardDesigner1.Dashboard.DataSources.Add(sqlDataSource);
        }
}

Alternatively, you can add a connection string (with parameters) to the application configuration file.


<connectionstrings>
        <add name="hxehost_Connection" connectionstring="XpoProvider=Hana;Server=hxehost:39015;UserID=;Password="/>
</connectionstrings>
Review the following help topics for more information data connection registration:

SAP HANA Documentation

Refer to the following tutorials for more information on SAP HANA client/configuration options:

Free DevExpress Products - Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We'll be happy to follow-up.