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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selecting the first record in a table field

Status
Not open for further replies.

ribbons

Technical User
Apr 26, 2007
113
US
Hi all,

I am using CR XI with an Access database.

I have another report question. The programmer who created both this database and front end designed the DB such that that the submitter of a sample AND the person who gets a copy of the report are recorded in the same table field: Companyname.

The submitter goes into the system first, so their field ID number is lowest. The name of the copy person goes in next. Is there any way to program a CR report field such that it will only show the first record in the field(or the name with the lowest field ID number). Can I do something with RecordCount? I have tried several methods with this with no success. This has been a nagging problem.

ribbons

 
Simplest might be to create a query on the Access database to return only that data, such as:

select * from table where table.id = (select minimum(table.id) from table)

You can also use something akin to the above in a Command Object within Crystal (Command Object is listed as Add Command under your data source, you paste in SQL as the source for a report).

Can't recall the exact Access syntax but that's basically it.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top