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

Records duplicated in sub report?

Status
Not open for further replies.

CherrySoda

Technical User
Jun 5, 2008
16
US
I am using Crystal 10 and linking an Interbase database to an Excel spreadsheet.

I am grouping by the Client_Name field from the Excel spreadsheet, and then using the selection criteria to pull only those records where the count of each name is greater than 1. (Thus not pulling any of the records where a person is on the spreadsheet only once)

The spreadsheet is linked to a table in the Interbase database, which stores dates and hours worked on each date. I want the report to display each of the dates worked by grouped employee (filtered by the previous selection criteria) with the hours for each date. So it would look something like this:

GH1 Jim Smith
Details 6/1/08 5 hours
Details 6/2/08 6 hours
Details 6/3/08 4 hours
GF1 Suppressed

However, since each of these filtered employees is on the spreadsheet more than one time, it will duplicate their information on the report like so:

GH1 Jim Smith
Details 6/1/08 5 hours
Details 6/1/08 5 hours
Details 6/2/08 6 hours
Details 6/2/08 6 hours
Details 6/3/08 4 hours
Details 6/3/08 4 hours
GF1 Suppressed

In this case, Jim Smith is on the spreadsheet twice. I suppose that I could group by person and then date and place the data in the date group's footer, but I am wondering if these is another way so that the data is not placed in the details section with each time the person is listed on the spreadsheet?
 
Ideally you would have a common primary key that gives you a 1 to many link from your xls to the database.

Since I dont think you can actually write sql statements for excel connections I suggest to go with the grouping as you described.

I do wonder though why you are using xls and if you can use the database only?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top