View Full Version : Duplicates; one to many records within report?


pablavo
10-23-2007, 05:54 AM
Hello folks

I've been trying to work this out but I'm a little wary incase I'm doing it incorrectly.

The records that are displayed within a report have a many side and these will be shown within sub reports so as not to display duplicates within the one side.

The problem I have is with the Dialog box that will be used to set the criteria to display records between the chosen dates.
Unfortunately the dates I'm using as criteria are fields of the many side relationship and I have to put this field within the main reports underlying query. When I do this I get duplicates within my report which in turn messes up my calculations.

I tried the Min function on the date (technically this date should be in the subreport along with it's fellow fields but not if I'm using it for search criteria) and it seems to work. However, I'm worried that the Min function is actually missing records within the many side relationship and it wont show all the records from the SubReport.

Does anyone know if I'm on the right track with this one or is there a more robust way if doing this sort of thing?

One more thing, I'm reluctant to use Hide duplicates within field properties for other reasons.

Thanks

neileg
10-24-2007, 04:34 AM
The records that are displayed within a report have a many side and these will be shown within sub reports so as not to display duplicates within the one side.
Why don't you just use the sorting and grouping options. This will suppress the repeating data.

Pat Hartman
10-28-2007, 07:09 PM
If neileg's solution doesn't work for you, change the main report's query to select distinct rows. As long as you are not selecting any fields from the many-side table you'll be fine. Just uncheck the selection box for the many-side criteria fields.