Build Oracle Eloqua Reporting-Connected Web Apps in Servoy
Servoy is a rapid application development and deployment platform. When paired with the CData JDBC Driver for Oracle Eloqua Reporting, users can build Oracle Eloqua Reporting-connected apps that work with live Oracle Eloqua Reporting data. This article describes how to connect to Oracle Eloqua Reporting from Servoy and build a simple web app to display and search Oracle Eloqua Reporting data.
With built-in optimized data processing, the CData JDBC Driver offers unmatched performance for interacting with live Oracle Eloqua Reporting data. When you issue complex SQL queries to Oracle Eloqua Reporting, the driver pushes supported SQL operations, like filters and aggregations, directly to Oracle Eloqua Reporting and utilizes the embedded SQL engine to process unsupported operations client-side (often SQL functions and JOIN operations). Its built-in dynamic metadata querying lets you work with Oracle Eloqua Reporting data using native data types.
Connect to Oracle Eloqua Reporting in Servoy Developer
To build Oracle Eloqua Reporting-connected apps, you need to first create a data provider in Servoy Developer using the CData JDBC Driver for Oracle Eloqua Reporting.
- Install the JDBC Driver.
- Copy the JDBC Driver JAR file. (cdata.jdbc.oracleeloquareporting.jar) to the /application_server/drivers/ directory in the installation directory for Servoy.
- Open Servoy Developer.
- In the Solution Explorer, right-click Database Server (under Resources) and choose "Connect to existing database" -> "empty."
- Name the server.
- Click to show the advanced server settings.
Set the URL, for example: jdbc:oracleeloquareporting:AuthScheme=Basic;User=user;Password=password;Company=MyCompany;
Built-In Connection String Designer
For assistance in constructing the JDBC URL, use the connection string designer built into the Oracle Eloqua Reporting JDBC Driver. Either double-click the JAR file or execute the jar file from the command-line.
java -jar cdata.jdbc.oracleeloquareporting.jar
Fill in the connection properties and copy the connection string to the clipboard.
Oracle Eloqua Reporting supports the following authentication methods:
- Basic authentication (User and Password)
- OAuth 2.0 code grant flow
- OAuth 2.0 password grant flow
Basic Authentication (User and Password)
To perform authentication with a user and password, specify these properties:
- AuthScheme: Basic.
- Company: The company name associated with your Oracle Eloqua Reporting account.
- User: Your login account name.
- Password: Your login password.
OAuth Authentication (Code Grant Flow)
To authenticate with the OAuth code grant flow, you must set AuthScheme to OAuth and create a custom OAuth application. For information about how to create a custom OAuth application, see the Help documentation.
Then set the following properties:
- InitiateOAuth: GETANDREFRESH. Used to automatically get and refresh the OAuthAccessToken.
- OAuthClientId: The client Id assigned when you registered your application.
- OAuthClientSecret: The client secret that was assigned when you registered your application.
- CallbackURL: The redirect URI that was defined when you registered your application.
When you connect, the driver opens Oracle Eloqua Reporting's OAuth endpoint in your default browser. Log in and grant permissions to the application. When the access token expires, the driver refreshes it automatically.
OAuth Authentication (Password Grant Flow)
With the OAuth password grant flow, you can use your OAuth application's credentials alongside your user credentials to authenticate without the need to grant permission manually via a browser prompt. You must create an OAuth app (see the Help documentation) to use this authentication method.
Set the following properties:
- AuthScheme: OAuthPassword
- Company: The company's unique identifier.
- User: Your login account name.
- Password: Your login password.
- OAuthClientId: The client Id assigned when you registered your custom OAuth application.
- OAuthClientSecret: The client secret assigned when you registered your custom OAuth application.
- Select the Driver class you just copied, for example, cdata.jdbc.oracleeloquareporting.OracleEloquaReportingDriver
Build a Oracle Eloqua Reporting-Connected Web App
Once you have configured the connection to Oracle Eloqua Reporting in the Servoy Developer resources, you are ready to build apps with access to live Oracle Eloqua Reporting data.
Create a New Solution
- In the Server Explorer, right-click "All solutions" and select "Create new solution."
- Name the solution.
- Select the checkbox to include the "search" module.
- Click "Finish."
Create a New Form
Right-click "Forms" and select "Create new form."
- Name the form.
- Select a Datasource.
- Set the type (e.g., Simple) and click "Finish."
Add a Data Grid to the Form
- Drag a Data Grid component (from Servoy NG-Grids) onto the form.
Drag a column component onto the Data Grid and set the "dataprovider" property for each column component to a column from the Oracle Eloqua Reporting "table" (e.g., from the table).
Continue adding columns as desired.
Add Searching to the App
Note that the "svySearch" extension is required to add search functionality (included by default when you create a new solution). If you did not add the extension when you created the solution or you are modifying an existing solution, you can add the search module by right-clicking Modules (in the solution) and selecting "Add Module." Select "svySearch" and click "OK."
- Drag a Text Field component onto the Form.
- Right-click the Form and select "Open in Script Editor."
- Create a new variable (JavaScript) to hold the search value:
var searchText = '';
- Back on the Form, in the Text Field properties:
- Set the "dataprovider" property to the Form variable you just created.
- Double-click to add a method for the onAction event.
- Click to create the method in "Form," name the method (e.g., onEnter), and click "Create private."
- Click "OK & Show."
- Add the following JavaScript to the JavaScript file to use the Servoy framework to implement searching bound data based on the text in the Text Field:
var search = scopes.svySearch.createSimpleSearch(foundset).setSearchText(searchText); search.setSearchAllColumns(); search.loadRecords(foundset);
Save and Launch the App
Save the form and JavaScript file, then click Run -> Launch NGClient to start the web app.
Download a free, 30-day trial of the CData JDBC Driver for Oracle Eloqua Reporting and start building Oracle Eloqua Reporting-connected apps with Servoy. Reach out to our Support Team if you have any questions.