Report detail repeats records (1 Viewer)

mbryant

New member
Local time
Today, 07:53
Joined
Apr 21, 2015
Messages
5
I have a report that contains a subreport (form) that pulls records from a query. When I go to run the report, the records are there correctly, but the subreport continues to duplicate many times.

How do I fix this?.....I hope I explained this right.
 

Ranman256

Well-known member
Local time
Today, 08:53
Joined
Apr 9, 2015
Messages
4,339
make the sub report query UNIQUE so you dont get duplicates.
 

mbryant

New member
Local time
Today, 07:53
Joined
Apr 21, 2015
Messages
5
My original query was a "make table" that my report and subform were pulling information from. I changed the query to be a regular query and made it unique. I am pulling information according to the date of the event.

Since I changed it to unique, now it is repeatedly asking for a date for each individual record. How do I stop that to where it will pull the records with me only entering the date once?
 

JHB

Have been here a while
Local time
Today, 14:53
Joined
Jun 17, 2012
Messages
7,732
Show the SQL-string.
Where do you input the date?
 

mbryant

New member
Local time
Today, 07:53
Joined
Apr 21, 2015
Messages
5
SELECT DISTINCT [Case Presentions].Initials, [Case Presentions].MRN, [Case Presentions].Age, [Case Presentions].[M/F], [Case Presentions].Dx, [Case Presentions].[Path?], [Case Presentions].Presenter, [Case Presentions].Site, [Case Presentions].[Clinical Staging] INTO [Current Week (Announcement)]
FROM [Case Presentions]
WHERE ((([Case Presentions].[Conference Date])=[Enter Conference Date]));
 

JHB

Have been here a while
Local time
Today, 14:53
Joined
Jun 17, 2012
Messages
7,732
If you still create a table [Current Week (Announcement), why not base the report on that table?
 

mbryant

New member
Local time
Today, 07:53
Joined
Apr 21, 2015
Messages
5
The report is based on that table, as is my subreport. However, the subreport continues to duplicate an unspecified number of times.

I'm not sure what I did wrong. I attached what my report design looks like.
 

Attachments

  • Capture.PNG
    Capture.PNG
    83.2 KB · Views: 91

JHB

Have been here a while
Local time
Today, 14:53
Joined
Jun 17, 2012
Messages
7,732
..
Since I changed it to unique, now it is repeatedly asking for a date for each individual record. How do I stop that to where it will pull the records with me only entering the date once?
I'm a little lost here, is it when you run the query, or is it when you open the report it ask for the Date?
Could you show the recordsource for the main report and for the subreport?
Did you link the main report and the subreport using the "Link Master Fields" and the "Link Child Fields"?
Else post your database with some sample data, (zip it) + info how to reproduce the fault you get.
 

mbryant

New member
Local time
Today, 07:53
Joined
Apr 21, 2015
Messages
5
Here is the process I follow. There is data preloaded so you can test it and hopefully see where I'm wrong.

Run the Case Presentations (Announcement) make query. Enter desired date (4/23/2015). I use this because the parent table Case Presentations will hold many records, some with the dates, that I will need to be pulled out for a single report.

It creates the Current Week (Announcement) table. The report pulls from that table. The report has a subform Current Week Cases (Announcement) that also pulls from the Current Week (Announcement) table.

Run the report Program Announcement. Enter desired date (4/23/2015) This is where the problem comes in. The records are being duplicated and reproduced many times within the report.

Does this help????
 

Attachments

  • DOT Conference.zip
    725.5 KB · Views: 65

JHB

Have been here a while
Local time
Today, 14:53
Joined
Jun 17, 2012
Messages
7,732
Your report doesn't work properly because it is fundamentally wrong set up.
We use the Main / subreport for grouping the data, but the data in the table you use as recordsource for the reports require no grouping - so either the main report need to be unbound, or the controls/ fields which displaying data in the sub report need to be created in the main report and then delete the sub report in the main report.
But don't use a form as sub report in a report and don't use a report as sub form in a form, they are used in completely different contexts.
Then you have a control called Text27, which has a control source set to "=[Conference Date]" - but you've no field in the table called [Conference Date], therefore it require you to type in each time the report runs.
 

Users who are viewing this thread

Top Bottom