> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cloud.cdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Crystal Reports

> This page outlines two different ways to connect to Connect AI from Crystal Reports: through OData or through the JDBC driver. After installation, Crystal Reports can pull data from sources that you have connected to your Connect AI account.

<Note>
  The OData method of connecting is simpler and faster than the JDBC method.
</Note>

## Prerequisites

Before you can configure and use Crystal Reports with Connect AI through either method, you must first connect a data source to your Connect AI account. See [Sources](/en/Sources) for more information.

You must also generate a Personal Access Token (PAT) on the [Settings](/en/Settings#personal-access-tokens) page. Copy this down, as it acts as your password during authentication.

**For OData connectivity only:** Create a [Workspace](/en/Workspaces). Later, you will use the **OData Service URL** on that page (*[https://cloud.cdata.com/api/odata/\{workspace\\\_name}](https://cloud.cdata.com/api/odata/\{workspace\\_name})*) with the relevant workspace name to establish the connection.

## Connect to Connect AI via OData

To establish a connection from Crystal Reports to Connect AI via OData, follow these steps.

<Steps>
  <Step>
    If necessary, download and install Crystal Reports from the SAP website.
  </Step>

  <Step>
    In Crystal Reports, select **File** > **New** > **Standard Report**.

    <Frame>
      <img src="https://mintcdn.com/cdata/dJhcR4yZCQgD8aFQ/en/images/crystal_reports_new_report.png?fit=max&auto=format&n=dJhcR4yZCQgD8aFQ&q=85&s=881396ec2694f039414087af0459d4cb" alt="Crystal Reports New Report" width="508" height="304" data-path="en/images/crystal_reports_new_report.png" />
    </Frame>
  </Step>

  <Step>
    In the **Standard Report Creation Wizard**, select **OData** as your data source.

    <Frame>
      <img src="https://mintcdn.com/cdata/dJhcR4yZCQgD8aFQ/en/images/crystal_reports_report_wizard.png?fit=max&auto=format&n=dJhcR4yZCQgD8aFQ&q=85&s=ac57f9ffc64a43247dcdccf4c0cf8a00" alt="Crystal Reports Report Wizard" width="586" height="450" data-path="en/images/crystal_reports_report_wizard.png" />
    </Frame>

    This opens the **OData** connectivity dialog.
  </Step>

  <Step>
    In the **OData** dialog, enter the following information:

    * **Service root URL**–*[https://cloud.cdata.com/api/odata/\{workspace\\\_name}](https://cloud.cdata.com/api/odata/\{workspace\\_name})*
    * **User ID**–enter your Connect AI username. This is displayed in the top-right corner of the Connect AI interface. For example, *[test@cdata.com](mailto:test@cdata.com)*.
    * **Password**–enter the PAT you generated on the [Settings](/en/Settings#personal-access-tokens) page.

    <Frame>
      <img src="https://mintcdn.com/cdata/dJhcR4yZCQgD8aFQ/en/images/crystal_reports_odata.png?fit=max&auto=format&n=dJhcR4yZCQgD8aFQ&q=85&s=e681441631ef0ffb452f1db2e2dc16ee" alt="Crystal Reports OData" width="453" height="471" data-path="en/images/crystal_reports_odata.png" />
    </Frame>

    Click **Finish**.
  </Step>

  <Step>
    The tables in the selected workspace now appear as an available data source under OData.

    <Frame>
      <img src="https://mintcdn.com/cdata/dJhcR4yZCQgD8aFQ/en/images/crystal_reports_data_source.png?fit=max&auto=format&n=dJhcR4yZCQgD8aFQ&q=85&s=1686d20b9515da99cbc1c755934ff7c3" alt="Crystal Reports Data Source" width="575" height="357" data-path="en/images/crystal_reports_data_source.png" />
    </Frame>
  </Step>

  <Step>
    Select the tables and columns for your report.

    <Frame>
      <img src="https://mintcdn.com/cdata/dJhcR4yZCQgD8aFQ/en/images/crystal_reports_addfields.png?fit=max&auto=format&n=dJhcR4yZCQgD8aFQ&q=85&s=3e07720e1431cec71b4ccb5f0e8cc7bd" alt="Crystal Reports Add Fields" width="588" height="443" data-path="en/images/crystal_reports_addfields.png" />
    </Frame>
  </Step>

  <Step>
    Click **Finish** to generate the report.
  </Step>
</Steps>

## Connect to Connect AI via JDBC Driver

To establish a connection from Crystal Reports to Connect AI through the JDBC driver, follow these steps.

<Steps>
  <Step>
    If necessary, download and install Crystal Reports from the SAP website.
  </Step>

  <Step>
    Download and install the Connect AI JDBC driver.

    a. Open the **Integrations** page of Connect AI.

    b. In the **Dev Tools** section, click **JDBC**.

    c. Download and run the setup file.

    d. When the installation is complete, locate the JDBC Connect JAR file in the JDBC driver's installation directory, for example, `C:\Program Files\CData\JDBC Driver for CData Connect\lib`.

    e. Copy the JDBC Connect JAR file.
  </Step>

  <Step>
    Find the installation directory for Crystal Reports, for example, `C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\java\lib`.
  </Step>

  <Step>
    Paste the JDBC Connect JAR file into the Crystal Reports installation directory.
  </Step>

  <Step>
    Go to the parent `java` folder (for example, `C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\java`). This folder should contain a `CRConfig` file.

    <Frame>
      <img src="https://mintcdn.com/cdata/dJhcR4yZCQgD8aFQ/en/images/crystal_reports_client.png?fit=max&auto=format&n=dJhcR4yZCQgD8aFQ&q=85&s=388c8d51a3ef2baa227de399dce9c34e" alt="Crystal Reports Client" width="1216" height="413" data-path="en/images/crystal_reports_client.png" />
    </Frame>
  </Step>

  <Step>
    Open `CRConfig` in a text editor.
  </Step>

  <Step>
    Add the path to the JDBC Connect JAR file in the `<Classpath>` of the `CRConfig` file, for example, `C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\java\lib`.

    <Frame>
      <img src="https://mintcdn.com/cdata/dJhcR4yZCQgD8aFQ/en/images/crystal_reports_config.png?fit=max&auto=format&n=dJhcR4yZCQgD8aFQ&q=85&s=f5dfdf428ee7d5b64b114445414be950" alt="Crystal Reports Config" width="1264" height="516" data-path="en/images/crystal_reports_config.png" />
    </Frame>
  </Step>

  <Step>
    Log in to Crystal Reports and start a blank report.
  </Step>

  <Step>
    In the **Database Expert** dialog, click **Create New Connection**.
  </Step>

  <Step>
    Select the **JDBC** data source and the tables you want to add. Click **OK**.

    <Frame>
      <img src="https://mintcdn.com/cdata/dJhcR4yZCQgD8aFQ/en/images/crystal_reports_addtables.png?fit=max&auto=format&n=dJhcR4yZCQgD8aFQ&q=85&s=99032e1bac30a22796f30a753dfb97e7" alt="Crystal Reports Add Tables" width="966" height="862" data-path="en/images/crystal_reports_addtables.png" />
    </Frame>
  </Step>

  <Step>
    In the **Connection** dialog, enter the **Connection URL** and **Database Classname**.

    <Frame>
      <img src="https://mintcdn.com/cdata/dJhcR4yZCQgD8aFQ/en/images/crystal_reports_connection.png?fit=max&auto=format&n=dJhcR4yZCQgD8aFQ&q=85&s=ca09d3cccb8526aed3a7372a3c1258f8" alt="Crystal Reports Connection" width="900" height="940" data-path="en/images/crystal_reports_connection.png" />
    </Frame>
  </Step>

  <Step>
    Click **Finish**. The **Database Expert** dialog displays all available connections.

    <Frame>
      <img src="https://mintcdn.com/cdata/dJhcR4yZCQgD8aFQ/en/images/crystal_reports_final.png?fit=max&auto=format&n=dJhcR4yZCQgD8aFQ&q=85&s=08a1f65ad661f5a809bac1c5e39d897e" alt="Crystal Reports Final" width="1002" height="890" data-path="en/images/crystal_reports_final.png" />
    </Frame>
  </Step>
</Steps>

You can now create reports with the connected data.
