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

Combining Reports 1

Status
Not open for further replies.

LARiot

Programmer
Feb 7, 2007
232
Hi, I really need help with this soon. If anyone can help ASAP I'd really appreciate it.

I have three sub reports that I want printed on one main report. How can I do this? How do add a total for one field which includes data from all of the subreports?

Thank you.
 
Apparently you are already aware that you can include the reports as subreports. You can reference totals from subreports with expressions like:
=subrptCtrl.Report.txtTotal

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 am trying to do the same, and whilst it works fine when records exist, it just return error# when one of the sub-reports doesnt contain data.

Is there a way around this ?
 
You can use syntax like:
=IIf(subrptCtrl.Report.HasData,subrptCtrl.Report.txtTotal,0)

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 Duane.

FYI - This is temporarly on the back burner.
 
By the way, what I ended up doing was using a query for the report. I added two fields. The first for the date range marking each record as one of three (before 2003, 2003-2006, and after 2006). The second a sort order (A, B and C respectively).

In the report itself I simply grouped and sorted the data.

In a nutshell, instead of combining three reports I separated one all inclusive one into three groups.

-Neema
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top