DataBind Zuora Data to the DevExpress Data Grid

Ready to get started?

Download for a free trial:

Download Now

Learn more:

Zuora ADO.NET Provider

Rapidly create and deploy powerful .NET applications that integrate with Zuora.



Use the CData ADO.NET Provider for Zuora with the DevExpress Windows Forms and Web controls to provide Zuora data to a chart.

The CData ADO.NET Provider for Zuora implements standard ADO.NET data access components that can be used with third-party controls. The standard ADO.NET process for databinding can be followed to enable bidirectional access to live data from UI controls. In this article we show how to use the CData components to databind to the DevExpress Windows Forms and Web controls; you will databind to a chart that displays current data.

Zuora uses the OAuth standard to authenticate users. See the online Help documentation for a full OAuth authentication guide.

Configuring Tenant property

In order to create a valid connection with the provider you need to choose one of the Tenant values (USProduction by default) which matches your account configuration. The following is a list with the available options:

  • USProduction: Requests sent to https://rest.zuora.com.
  • USAPISandbox: Requests sent to https://rest.apisandbox.zuora.com"
  • USPerformanceTest: Requests sent to https://rest.pt1.zuora.com"
  • EUProduction: Requests sent to https://rest.eu.zuora.com"
  • EUSandbox: Requests sent to https://rest.sandbox.eu.zuora.com"

Selecting a Zuora Service

Two Zuora services are available: Data Query and AQuA API. By default ZuoraService is set to AQuADataExport.

DataQuery

The Data Query feature enables you to export data from your Zuora tenant by performing asynchronous, read-only SQL queries. We recommend to use this service for quick lightweight SQL queries.

Limitations
  • The maximum number of input records per table after filters have been applied: 1,000,000
  • The maximum number of output records: 100,000
  • The maximum number of simultaneous queries submitted for execution per tenant: 5
  • The maximum number of queued queries submitted for execution after reaching the limitation of simultaneous queries per tenant: 10
  • The maximum processing time for each query in hours: 1
  • The maximum size of memory allocated to each query in GB: 2
  • The maximum number of indices when using Index Join, in other words, the maximum number of records being returned by the left table based on the unique value used in the WHERE clause when using Index Join: 20,000

AQuADataExport

AQuA API export is designed to export all the records for all the objects ( tables ). AQuA query jobs have the following limitations:

Limitations
  • If a query in an AQuA job is executed longer than 8 hours, this job will be killed automatically.
  • The killed AQuA job can be retried three times before returned as failed.

Windows Forms Controls

The code below shows how to populate a DevExpress chart with Zuora data. The ZuoraDataAdapter 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 (ZuoraConnection connection = new ZuoraConnection( "OAuthClientID=MyOAuthClientId;OAuthClientSecret=MyOAuthClientSecret;Tentant=USProduction;ZuoraService=DataQuery;InitiateOAuth=GETANDREFRESH")) { ZuoraDataAdapter dataAdapter = new ZuoraDataAdapter( "SELECT Id, BillingCity FROM Invoices WHERE BillingState = 'CA'", 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[] { "BillingCity" }); series.ArgumentScaleType = DevExpress.XtraCharts.ScaleType.Qualitative; series.ArgumentDataMember = "Id"; series.ValueScaleType = DevExpress.XtraCharts.ScaleType.Numerical; chartControl1.Legend.Visibility = DevExpress.Utils.DefaultBoolean.False; ((DevExpress.XtraCharts.SideBySideBarSeriesView)series.View).ColorEach = true; }

Web Controls

The code below shows how to populate a DevExpress Web control with Zuora data. The ZuoraDataAdapter 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 (ZuoraConnection connection = new ZuoraConnection( "OAuthClientID=MyOAuthClientId;OAuthClientSecret=MyOAuthClientSecret;Tentant=USProduction;ZuoraService=DataQuery;InitiateOAuth=GETANDREFRESH")) { ZuoraDataAdapter ZuoraDataAdapter1 = new ZuoraDataAdapter("SELECT Id, BillingCity FROM Invoices WHERE BillingState = 'CA'", connection); DataTable table = new DataTable(); ZuoraDataAdapter1.Fill(table); DevExpress.XtraCharts.Series series = new Series("Series1", ViewType.Bar); WebChartControl1.Series.Add(series); series.DataSource = table; series.ValueDataMembers.AddRange(new string[] { "BillingCity" }); series.ArgumentScaleType = ScaleType.Qualitative; series.ArgumentDataMember = "Id"; series.ValueScaleType = ScaleType.Numerical; ((DevExpress.XtraCharts.SideBySideBarSeriesView)series.View).ColorEach = true; }