Symptom
- Select Distinct Records option grayed out.
- Unable to select the option: "Select Distinct Records" when reporting off some Business View in Crystal Reports.
Environment
- SAP Crystal Reports 2008
- SAP Crystal Reports 2011
- SAP Crystal Reports 2013
- SAP Crystal Reports 2016
Reproducing the Issue
- In Crystal Reports, create a report off a Business View.
- Under the menu "Database", notice the option "Select Distinct Records" is grayed out.
Cause
- The database option "Select Distinct Records" is unavailable in Crystal Reports when the Business View is based off:
- a data source connection that is not ODBC, OLE DB or SQL native drivers; or
- a stored procedure; or
- a command object; or
- multiple data sources.
because Crystal Reports is either not generating the SQL Query, or cannot generate one SQL Query to add the "Select Distinct" clause in it.
Resolution
- If the Business View is based off a Command Object or a Stored Procedure, modify the SQL Query in the Command Object or Stored Procedure directly, and add the Select Distinct statement.
Keywords
Business Views, CR, BV, Select Distinct , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Problem
Product
Crystal Reports 2008 V1 ; SAP Crystal Reports 2011 ; SAP Crystal Reports 2013 ; SAP Crystal Reports 2016