FlexReport for WPF | ComponentOne
In This Topic
    ADO.NET DataConnector Integration
    In This Topic

    FlexReportDesigner lets you bind report from online data sources to data using ADO.NET DataConnectors. This allows you to easily and quickly design and create reports from Salesforce, OData, Dynamics 365 Sales, Google Analytics, Kintone, and QuickBooks Online using the FlexReport designer. It is made possible using the ComponentOne DataConnectors library, which is available separately for developers to access and generate their reports entirely programmatically as well. 

    Let us explore how to use DataConnectors to generate a data connection and generate report in FlexDesigner App.

    The following steps demonstrate how you can connect to Salesforce and create a report from Salesforce data using FlexReport designer.

    1. Launch the C1FlexReportDesigner.4.6.2.exe for 64-bit platform and C1FlexReportDesigner32.4.6.2.exe for 32-bit platform located at the following location on your computer:
      C:\Program Files (x86)\ComponentOne\Apps\v4.6.2
    2. From the Reports tab on the left, click New Report dropdown button. This opens the FlexReport Wizard which walks us through the basic report setup.
    3. Select the ADO.NET.Salesforce data provider, C1.AdoNet.Salesforce, from the Data provider drop-down.
    4. Enter your connection string.
      To build your connection string, you need to have a Salesforce account. You can get the client ID and OAuth endpoint from the Salesforce website by registering your application and generating the security token.
    5. Select tables and fields you want to display in the report or enter SQL statement to select the tables and fields and click Next.
      In this example, we used SQL statement as shown in the image below:
    6. Click through the wizard selecting other settings for the report such as style, layout template and title of the report. Then, click Finish.
      This generates the report. The report generated in this example is shown below. 
       

    You can continue editing the report template by resizing or rearranging fields. The FlexReport designer supports snap lines, which allows you to easily align report fields. If you want to add a new field from the Salesforce data set, select Insert - Text - and select the field name. Then, drag where in the report you want the field to display.

    Similar to Salesforce, you can connect to OData, Dynamics 365 Sales, Google Analytics, Kintone, and QuickBooks Online, and create reports using the data accessed from these data providers. You just need to select the respective data provider and provide the connection string. The connection strings for all these data providers are given in the following table:

    Provider Name Connection String
    C1.AdoNet.Salesforce
    Username=***@****.com;Password=******;
    Security Token=yourToken;
    OAuth Client Id=*******;
    OAuth Client Secret=*****;
    OAuth Token Endpoint=yourToken;
    Url=https://***/***/***;
    Use Pool = false; Max Page Size = 200
    
    C1.AdoNet.OData
    Url=https://services.odata.org/***/***/****
    
    C1.AdoNet.D365S
    Url=https://***/***/***;
    OAuth Client Id=***********;
    OAuth Client Secret=********;
    OAuth Token Endpoint=https://***/***/***;
    OAuth Extend Properties=yourExtendProperties;
    Use Etag=true;Max Page Size = 100
    
    C1.AdoNet.Kintone
    Url=https://***/***/***;
    Username=***@****.com;Password=******
    
    C1.AdoNet.QuickBooksOnline
    Company Id=yourID;Use SandBox=true;
    OAuth Client Secret=********;
    OAuth Client Id=********;
    OAuth Access Token=yourToken;
    OAuth Refresh Token=********;
    OAuth Token Endpoint=https://***/***/***;
    Minor Version=52
    
    C1.AdoNet.GoogleAnalytics
    Key File=yourWijmoFile.json;
    View Id=*******"
    

    You can download the FlexReport designer and the data connector libraries from https://developer.mescius.com. Note that the FlexReportDesigner app with built-in DataConnector is available with ComponentOne Studio Enterprise only.

    Also, note that in order to use DataConnectors with FlexReport in Visual Studio, you need to add the data connector package in your Visual Studio project to integrate it with the report control.