Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"SELECT DISTINCT RECORDS " GREYED OUT?? 2

Status
Not open for further replies.

TNN

Programmer
Sep 13, 2000
417
US
Using crystal reports version 9. On the drop down menu for the Database tab the selection "Select Distinct Records" is greyed out. Can anyone tell me what mode to be in for this not to be greyed out????

I am trying to use this selection for my SQL statement to select distinct records.

TNN, Tom


TOM
 
Most likely you are using a native database connection such as directly to a MS Access or Btrieve database. SQL options are disabled when using a native connection.

If this is the case, create an ODBC data source in control panel and connect to the ODBC data source. Then oyu will have the show SQL query option available.

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
Or, you might be using a 'command' or a QRY or a Stored Procedure as your data source. In that case you should modify the SQL at the source.

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Expert's Guide to Formulas / Guide to Crystal in VB
- tek@kenhamady.com
 
dgillz and kenhamady,

Yes, I see it. I am using an access 2000 database and whenever the Database Expert has a sql command as the selected table the "select distinct records" is greyed out.

Thank You both for your input.

TNN, Tom


TOM
 
Tom: You can use ODBC for Access, and then the usual Crystal database manipulation functions will be available to you.

If you're using Access, create a Query in Access and include distinct in the select, and point the report at the Query, this will alleviate the problem.

-k
 
I am using ADO.NET datasets to populate a Crystal report (2 Typed Datasets, linked by Key)...

it seems that "Select Distinct Records" is disabled,

I appear to be getting a lot of duplicates,

Is there any way of getting rid of duplicates other than suppressing the detail section?

groganBall
 
That option is only available when the report generates the SQL. It then adds the word DISTINCT to the SELECT statement. Since you are generating your own data and passing it to the report you would need to modify the SQL used to generate the dataset. If you can't do that you will probably have to group and hide the details in the report.

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Expert's Guide to Formulas / Tips and Tricks / Guide to Crystal in VB
- TEK2(AT)kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top