One Subreport and two Main Reports???

amona

Registered User.
Local time
Today, 00:50
Joined
Jan 31, 2012
Messages
12
I am trying to use one subreport in two different main reports.
The DB is about facilities inventory in a university.
The subreport is showing PCs info, and the 1st main reports showing administrative departments and another showing academic departments.
I use yes/no field to mark academic departments. So, I use this filed to display PCs info for academic dep by adding the following to the where clause in the subreport:
[Reports]![FirstMainReport]![Academic].
Until this point it is working.
I am trying to make the where clause to work with this:
WHERE (((Department.Academic)=[Reports]![FirstMainReport]![Academic] Or (Department.Academic)=[Reports]![SecondMainReport ]![Academic]));
Then I can use the same subreport in the 2d main report to show PCs info for administrative departments.
Is that possible?
 
You just can't. When the subreport loads it will be looking to see if both reports are open.

You will need to duplicate your subreport for use in the other report. Or if you know how to code, you can set the Record Source of your report to be a query and amend the query in code each time you open any of the reports. The former is much easier for you.
 
Last edited:
Thanks, I appreciate your replay and want to do the second way (I did simple coding before).
I do not like repetition it is not professional.
Would you explain it, please?
 
Well, if you did simple coding then the second option is not for you.
 

Users who are viewing this thread

Back
Top Bottom