Ready to get started?

Learn more about the CData ADO.NET Provider for Stripe or download a free trial:

Download Now

Publish Crystal Reports on Stripe Data

Use the Report Wizard and standard ADO.NET to design a report based on up-to-date Stripe data.

The CData ADO.NET Provider for Stripe is fully integrated into the Crystal Reports for Visual Studio development environment. You can use the standard ADO.NET components to create reports just like you would work with SQL Server, but with real-time connectivity to Stripe. This article shows how to complete the three steps necessary to add Stripe data to a report that refreshes when opened.


Create a Crystal Reports Application


Connect to Stripe

Creating an ADO.NET data source for Stripe from Server Explorer makes it easy to create a DataSet that can be used in Crystal Reports wizards and the Crystal Reports Designer. You can find a guide to working with Stripe data in Server Explorer in the "Getting Started" chapter of the help documentation.



Create a DataSet

Follow the steps below to use the Visual Studio ADO.NET DataSet Designer to create an ADO.NET DataSet object. Crystal Reports will bind to the DataSet object, which contains Stripe table metadata. Note that this approach also adds a connection string to App.config; you will use this connection string later to load data into the report.

  2. Select DataSet. The DataSet Designer is then displayed.
  3. Drag and drop tables from Server Explorer onto the DataSet Designer. This article uses the Customers table.

Add Stripe Fields to the Report



Load Data into the Report

Having created the DataSet, which will only contain the metadata, you will now need to create the DataTable containing the actual data. You can use the StripeDataAdapter to fill a DataTable with the results of an SQL query.

      <startup useLegacyV2RuntimeActivationPolicy="true">
  3. Add the following references in your Window.xaml.cs file:

    using System.Configuration;
    using CrystalDecisions.CrystalReports.Engine;
    using CrystalDecisions.Shared;
    using System.Data.CData.Stripe;
    using System.Data;

    private void Window_Loaded(object sender, RoutedEventArgs e) {
      ReportDocument report = new ReportDocument();
     var connectionString = ConfigurationManager.ConnectionStrings["MyAppConfigConnectionStringName"].ConnectionString;
      using (StripeConnection connection = new StripeConnection(connectionString)) {
        StripeDataAdapter dataAdapter = new StripeDataAdapter(
        "SELECT Email, Discount FROM Customers", connection);
         DataSet set = new DataSet("_set");
         DataTable table = set.Tables.Add("_table");
      reportViewer.ViewerCore.ReportSource = report;

    <Window x:Class="CrystalReportWpfApplication4.Window1"

Chart Stripe Data


  4. On the Data tab, select the column and conditions for the x-axis. For example, drag the Email column in the DataSet node onto the box under the On Change Of menu.
  6. Select the columns and summary operations for the y-axis. For example, drag the Discount column in the DataSet node into the Show Values box.
  7. Run the report.

Note that Crystal Reports performs the aggregation on the data already loaded into DataTable, instead of, for example, executing a GROUP BY to the Stripe API. This will also be true for the report creation wizards.

You could gain more control over the queries executed to Stripe by creating another DataSet and populating it with a different query. See the help documentation for more information on the driver's SQL engine.