Duplicate Entries from Subreport

  • Thread starter Thread starter Pete
  • Start date Start date
P

Pete

I have a report which shows members vehicle
registrations. If the member has say 3 vehicles, I get 3
entries in the report for that member. How can I get the
report to show only 1 entry with all vehicles.

tables are setup as follows

tblMember
MemberID
FirstName
etc...

tblMemberMemberVehicles
CarRegID
MemberID
Vehicle

I have a 1 to many relationship from the above tables to
allow for more than vehicle.

I then base a query on the above tables giving me

MemberID (from tblMember)
Firstname
etc.. etc..
CarRegID (from tblMemberVehicles)
MemberID (from tblMember)
Vehicle (from tblMemberVehicles)

The report is based upon this query with a subreport
based on the folowing query

CarRegID (from tblMemberVehicles)
Vehicle (from tblMemberVehicles)
MemberID (from tblMember)

any help would be appreciated

Pete
 
Hi Pete.
Would you give an example from how the data now shows and how you wish to
display the data?
For instance right now you may see:
MemberData Car1Data
MemberData Car2Data
MemberData Car3Data
and what you want is:
MemberData Car1Data, Car2Data, Car3Data
or do you want:
MemberData Car1Data
Car2Data
Car3Data
Each would be a different approach.
Hope this helps.
Fons
 
Hi Fons

What I would like is your 3rd option

Memberdata Car1Data
Car2Data
Car3Data

What I am getting is the above duplicated depending on
the number of vehicles. If a member has 2 cars, I get 2
entries etc..

Hope you can help. One thing when I look at the subreport
on it's own, I get what I expected to see. But when I
view the main report, it gives me more than I want.

Hope that makes sense

Pete
 
Hi.
Well, that one is not so hard.
Set the hide duplicates property for the MemberData textbox(es) to yes.
This could however give some undesired results because it would hide any
repeats from the previous record.
John Doe Car1
John Doe Car2
Jane Doe Car1
would result in
John Doe Car1
Car2
Jane Car1
To prevent this concatenate the first and last name
in an unbound textbox make the source
=[FirstName] & " " & [LastName]
Now you would get
John Doe Car1
Car2
Jane Doe Car1
Hope this helps.
Fons
 
Hi Fons

Strange this, I've done as you suggest, but now what I
get is:

MemberData Car1
Car2
Car3

Car1
Car2
Car3

MemberData Car1

Can we set change the above to show

MemberData Car1, Car2, Car 3

Thanks

Pete
-----Original Message-----
Hi.
Well, that one is not so hard.
Set the hide duplicates property for the MemberData textbox(es) to yes.
This could however give some undesired results because it would hide any
repeats from the previous record.
John Doe Car1
John Doe Car2
Jane Doe Car1
would result in
John Doe Car1
Car2
Jane Car1
To prevent this concatenate the first and last name
in an unbound textbox make the source
=[FirstName] & " " & [LastName]
Now you would get
John Doe Car1
Car2
Jane Doe Car1
Hope this helps.
Fons


Hi Fons

What I would like is your 3rd option

Memberdata Car1Data
Car2Data
Car3Data

What I am getting is the above duplicated depending on
the number of vehicles. If a member has 2 cars, I get 2
entries etc..

Hope you can help. One thing when I look at the subreport
on it's own, I get what I expected to see. But when I
view the main report, it gives me more than I want.

Hope that makes sense

Pete
get
3 get
the tables
to
.
 
Back
Top