DataBind JD Edwards Data to the DevExpress Data Grid

Jerod Johnson
Jerod Johnson
Director, Technology Evangelism
Use the CData ADO.NET Provider for JD Edwards with the DevExpress Windows Forms and Web controls to provide JD Edwards data to a chart.

The CData ADO.NET Provider for JD Edwards incorporates conventional ADO.NET data access components compatible with third-party controls. You can adhere to the standard ADO.NET data binding procedures to establish two-way access to real-time data through UI controls. This article will demonstrate the utilization of CData components for data binding with DevExpress UI Controls (Windows Forms and Web controls), specifically binding to a chart that visualizes live data.

The driver connects to JD Edwards through your Application Interface Services (AIS) Server. Set the following connection properties:

  • URL: The base HTTPS URL of your AIS Server (e.g., https://jde-ais.example.com:8300).
  • User: Your JD Edwards username.
  • Password: Your JD Edwards password.
  • Environment (optional): The JD Edwards environment to use (e.g., PD920 for production or DV920 for development). If not specified, the AIS Server's default environment is used.
  • Role (optional): The JD Edwards role for the session. If not specified, the AIS Server's default role is used.
  • DeviceName (optional): An identifier for the connecting device or application, used for auditing and logging on the AIS Server.
  • Jasserver (optional): The specific Java Application Server (JAS) instance to route requests through, useful in clustered environments.

Choosing Which Data Is Exposed

JD Edwards organizes tables and business views by System Code, and the driver exposes each System Code as its own schema. Use these properties to control which schemas are available:

  • DataModel: One or more ERP modules (comma-separated) whose System Codes are exposed as schemas, or All to expose every System Code in the connected instance. Defaults to FinancialManagement.
  • SystemCodes: A comma-separated list of additional System Codes to expose alongside those from DataModel (e.g., 42,43).

When you connect, the driver sends your credentials to the AIS Server to obtain a session token and caches it. The driver requests a new token automatically before the session expires.

Windows Forms Controls

The code below shows how to populate a DevExpress chart with JD Edwards data. The JDEdwardsDataAdapter binds to the Series property of the chart control. The Diagram property of the control defines the x- and y-axes as the column names.


using (JDEdwardsConnection connection = new JDEdwardsConnection(
"URL=https://your-jde-environment-app.example.com;User=admin;Password=myPassword;")) {
  JDEdwardsDataAdapter dataAdapter = new JDEdwardsDataAdapter(
  "SELECT DocumentNumber, Amount FROM AccountsPayable.AccountLedger WHERE BusinessUnit = '100'", connection);
  
  DataTable table = new DataTable();
  dataAdapter.Fill(table);
  DevExpress.XtraCharts.Series series = new DevExpress.XtraCharts.Series();
  chartControl1.Series.Add(series);
  series.DataSource = table;
  series.ValueDataMembers.AddRange(new string[] { "Amount" });
  series.ArgumentScaleType = DevExpress.XtraCharts.ScaleType.Qualitative;
  series.ArgumentDataMember = "DocumentNumber";
  series.ValueScaleType = DevExpress.XtraCharts.ScaleType.Numerical;
  chartControl1.Legend.Visibility = DevExpress.Utils.DefaultBoolean.False;
  ((DevExpress.XtraCharts.SideBySideBarSeriesView)series.View).ColorEach = true;                              
}
The complete code example and the resulting chart.

Web Controls

The code below shows how to populate a DevExpress Web control with JD Edwards data. The JDEdwardsDataAdapter binds to the Series property of the chart; the Diagram property defines the x- and y-axes as the column names.


using DevExpress.XtraCharts;

using (JDEdwardsConnection connection = new JDEdwardsConnection(
"URL=https://your-jde-environment-app.example.com;User=admin;Password=myPassword;"))
{
  JDEdwardsDataAdapter JDEdwardsDataAdapter1 = new JDEdwardsDataAdapter("SELECT DocumentNumber, Amount FROM AccountsPayable.AccountLedger WHERE BusinessUnit = '100'", connection);
  DataTable table = new DataTable();
  JDEdwardsDataAdapter1.Fill(table);
  DevExpress.XtraCharts.Series series = new Series("Series1", ViewType.Bar);
  WebChartControl1.Series.Add(series);
  series.DataSource = table;
  series.ValueDataMembers.AddRange(new string[] { "Amount" });
  series.ArgumentScaleType = ScaleType.Qualitative;
  series.ArgumentDataMember = "DocumentNumber";
  series.ValueScaleType = ScaleType.Numerical;
  ((DevExpress.XtraCharts.SideBySideBarSeriesView)series.View).ColorEach = true;
}
An ASP.NET application created with the ADO.NET Provider and the DevExpress Web Forms control. (Salesforce is shown.)

Ready to get started?

Download a free trial of the JD Edwards Data Provider to get started:

 Download Now

Learn more:

JD Edwards Icon JD Edwards ADO.NET Provider

Rapidly create and deploy powerful .NET applications that integrate with JD Edwards data including AccountLedger, ProposalofPayment, ContractRevenueSummary, EmployeeEnrollment, RentIncreaseAmounts, and more!