skip to main content
Using Salesforce reports : Salesforce data store reports
 

Try DataDirect Cloud Now

Salesforce data store reports

Salesforce-based data stores deliver several types of standard reports that users can customize. The connectivity service can access custom reports that use the tabular, summary, or matrix formats. If you want to access a standard report, you can save most standard reports as custom reports and access them through the DataDirect Cloud connectivitiy service. Check with your Salesforce administrator to make sure that you have the necessary permissions to create custom reports.
Salesforce-based data stores organize reports into folders. The connectivity service incorporates the folder name and report name into the procedure name reported by SQLProcedures. The name is created by prepending the folder name to the report name using an underscore to join them. Additionally, any spaces in the report or folder names are replaced with an underscore character. Like all identifier name metadata returned by the connectivity service, the procedure name is uppercase. For example, if a report named Opportunity Pipeline is in the folder Opportunity Reports, it would be rendered as:
OPPORTUNITY_REPORTS_OPPORTUNITY_PIPELINE
An application invokes a report using the standard Call escape syntax, {call report name}, and the appropriate mechanisms for handling a resultset.
The following example shows one way to invoke the Opportunity Pipeline report using the driver for ODBC:
SQLRETURN      retVal;
HSTMT         hStmt = NULL;
SQLWCHAR*      sql;
sql = L"{call OPPORTUNITY_REPORTS_OPPORTUNITY_PIPELINE}";
retVal = SQLExecDirect(hStmt, sql, SQL_NTS);
if (SQL_SUCCESS == retVal) {
        //     process results
}
The following example shows one way to invoke the Opportunity Pipeline report using the driver for JDBC:
String sql = "{call OPPORTUNITY_REPORTS_OPPORTUNITY_PIPELINE()}";
CallableStatement callStmt = con.prepareCall(sql);
boolean isResultSet = callStmt.execute();
if (isResultSet) {
resultSet = callStmt.getResultSet();
// process the resultset
}
Note: Reports in the joined, or multi-block, format are not supported.
Note: When passing parameters to stored procedures, reports are not supported.