Access report question

MrHockey

New Member
Joined
Jul 2, 2009
Messages
24
Hi -

I have a report that has a subreport embeded in it. There is a work order field in the main report and in the sub report, so they are my master and child links. The main report list costs associated to work orders related to vender invoices, where as the subreport list costs associated to materials.

When you run a report you are asked to enter a work order # this parameter is passed to the main report and through the link is passed onto the child, however I have a problem.....some reports I run have do not have vendor invoice costs (no data in the main report) but they do have material costs (data in the subreport), so when I run my report it works perfect when there are both types of costs or if there is vendor invoice costs, but it does not work when there are only material costs (only data that would appear in the supreport.

How can I work around this?

Thanks!
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
In the data condition you're describing, you have work order 123 in the data source for the subreport. In the data source for the main report, is there a work order 123?
If not, this is why they're not showing up.
Phil...
 
Upvote 0
That is exactly my problem....is there not away to run the subreport based on a parameter (i tried adding a second parameter to the subreport) so that the subreport returns values even if there isn't anything in the main report?

I assume there isn't.....would you have a suggestion on how I should apporoach this report?

Thanks.
 
Upvote 0
Is the main report based on a table or a query? If it's a table, I would suggest a query where the data source for the subreport is the first table with a left join link to the main table on the work order number. It will provide all the records in the subreport's data source and only the ones in the main report's data source where the 2 are equal.
Hope that helps.
Phil...
 
Upvote 0
The problem with that is if there is only vendor invoice costs and no material costs then I will have the same problem...won't I?

Essentially, these are the possible outcomes of the querry:

1 - Material only
2 - Vendor only
3 - Material and Vendor
 
Upvote 0
Yes you will. To work properly, the work order number field value must exist in your main table even if no other fields of infomation in your main table are populated.
Phil...
 
Last edited:
Upvote 0
I don't think so. I've only ever done a parameter-based report where the parameter existed in the query used as the data source for the report.
Phil...
 
Upvote 0
Got...I made both the vendor and material costs subreports on a main report that just has the work order information in it.

Thanks.
 
Upvote 0

Forum statistics

Threads
1,224,502
Messages
6,179,126
Members
452,890
Latest member
Nikhil Ramesh

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top