skip to main content
About the Driver : Using the driver : Reports
  

Try DataDirect Drivers Now

Reports

The driver exposes reports defined on an Oracle Service Cloud instance as stored procedures. An application can obtain a list of the reports defined on an Oracle Service Cloud instance by calling the DatabaseMetaData.getProcedures method. The names of the reports that can be invoked through the driver are listed in the PROCEDURE_NAME name column of the getProcedures() results.
The driver incorporates report name and unique report ID into the procedure name reported by getProcedures(). The driver creates the reported procedure name by appending the report ID to the report name using an underscore (_) to join them. Additionally, any spaces in the report name are replaced with an underscore character. The report name is also prepended with RN if the report starts with a digit. Like all identifier name metadata returned by the driver, the procedure name is uppercase. For example, a report named Contact Lookups would be modified as follows:
CONTACT_LOOKUPS_14001
An application invokes a report using the standard Call escape syntax:
CALL ReportName (FilterName operator FilterValue;FilterName operator FilterValue...)
And JDBC mechanisms are used for calling a stored procedure that returns a result set. The following example shows one way to invoke the Contact Lookups report:
String sql = "{call CONTACT_LOOKUPS_14001('[Contact ID] < 10')}";
CallableStatement callStmt = con.prepareCall(sql);
boolean isResultSet = callStmt.execute();
if (isResultSet)
{ resultSet = callStmt.getResultSet(); // process the resultset }
In this example, the standard Call escape syntax is employed for the Opportunities report:
CALL Opportunities_13029 ([Opportunity ID] > 10;[Organization ID] < 20;
Name [NOT LIKE] [Imaging Equipment])
The following rules for filters apply when writing applications which use reports:
*Filters are separated by semicolons.
*The FilterName must be specified to the left of the operator; the FilterValue must be specified to the right of the operator.
*FilterName or FilterValue must be delimited by brackets ([]) if it contains the following special characters:
';', '.', '?', '/', '(', ')', '{', '}', '[', ']', ',', whitespace,
operators, single quote, double quote
*If a singlequote (') is part of the Filter Name or Filter Value, it must be doubled.
*If single bracket (]) is part of the Filter Name or Filter Value, it must be doubled.
*The following multiple-word operators must be delimited by []:
NOT LIKE, IN LIST, NOT IN LIST, NOT REGEX
*null is considered a NULL value. For example, Name = null. In contrast, if 'null' is the string literal, it must be delimited by [].
*An empty string is represented as []. For example, Name = [].
The following table shows the operators available for column comparison.
Table 12. Operators for Column Comparison
Name
Operator
Equal
=
Not Equal
<>
Less Than
<
Less Than or Equal To
<=
Greater Than
>
Greater Than or Equal To
>=
Is Like
LIKE
Is Not Like
NOT LIKE
Is Between
RANGE
Is In List
IN LIST
Is Not In List
NOT IN LIST
Not Equal To or NULL
NLIKE_OR_NULL
Not Like or NULL
NLIKE_OR_NULL
Regular Expression
REGEX
Not Regular Expression
NOT REGEX