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!

Subreport only shows one record

Status
Not open for further replies.

Dophia

Technical User
Jul 26, 2004
263
CA
I have a report with two subreports. One subreport works well, but the other only shows one record; whereas, on it's own, it shows all of the records.

The main report is based on a query, whereas the two subreports are based on another query. The child/parent relationship is okay. I've tried making one of the subreports, a sub of the other subreport and also a subreport of the main report, but nothing changes.

Does anyone have any suggestions?
Sophia
 
My first suggestion is to check the Link Master/Child properties. Maybe remove them from the problem subreport. Then, make sure the subreport can grow and its section can grow.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Thanks for the suggestion. I removed the Master/Child link and the subreport shows all of the records now.

In the main report, I have a query to only show records for a certain date. This also works fine.

What else should I do?
Sophia
 
Ok, so your link master/child is wrongly limiting the records in the subreport. If you can't figure this out, you need to tell us something about your record sources and their relationship.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
I've tried changing everything that I can think of for the past week, so if someone could help me solve this problem, I would really appreciate it.

The report and subreports are as follows:

Main report: Based on QueryInvCashVisaTotal which is based on tables: tblInvoice, tblInvoiceDetails, tblFees

Subreport 1: Based on a query from the same three tables from the main report and is named QryInvoiceDetails, but then named "Qry InvPt2"

Subreport 2: same as subreport 2, but the query is named "Qry InvPt2b"

I am trying to accomplish the following:
Main report lists how the invoices were paid, eg Cash, Visa, etc.
Subreport 1: Lists the invoices in detail
Subreport 2: Lists the category of the invoice, such as "Fines", "Adoptions" etc.(for an animal shelter)

The main report and subreport 1 work fine, but the subreport 2 only lists certain invoices. If I don't use a date range for the report, it works, but I need a date range.


SELECT QryInvoice_details.Invoice_Date, QryInvoice_details.Income_Category, QryInvoice_details.Invoice_No, QryInvoice_details.Item_No, QryInvoice_details.Item, QryInvoice_details.Fee, QryInvoice_details.Quantity, QryInvoice_details.ExtendedPrice, QryInvoice_details.[PS_#], QryInvoice_details.Income_Category
FROM QryInvoice_details
GROUP BY QryInvoice_details.Invoice_Date, QryInvoice_details.Income_Category, QryInvoice_details.Invoice_No, QryInvoice_details.Item_No, QryInvoice_details.Item, QryInvoice_details.Fee, QryInvoice_details.Quantity, QryInvoice_details.ExtendedPrice, QryInvoice_details.[PS_#], QryInvoice_details.Income_Category;

Thanks for any suggestions,
Sophia
 
We don't know where the subreports are located (detail or other section). We also don't know anything about your link master child properties or how "a date range" is used in your report.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top