skip to main content
Querying data stores with SQL : Using Salesforce reports : Salesforce data store reports

Try 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 Hybrid Data Pipeline 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:
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;
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:
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.