Question : Need Subreport and main report to return same data

On the current report I am working on I have a listing of chemical usage.  The chemical is then broken down by division then region showing totals for each group, chemical being the top level group.  

On each new chemical I have it jumping to a new page so it is easier to read.  My problem is this, the user wants a summary page that shows the grand total of each chemical one right after another on the last page of the report.  I have tried using the Report footer but it then groups all the chemical together for a grand Total.

When using a sub report it will not get the same info.  I have tried using the Link Master/Child fields but it will only return the last record of the main report (Maybe I am doing it wrong).

Both reports (main and sub) are using the same query and tables.  The main report gets it filter from a form that I have tried to pass to the sub report but anywhere I looked online said this really isn't  possible.

So in short what I need is the sub report to return the same data the main report is getting.  Any help is greatly appreciated


 

Answer : Need Subreport and main report to return same data

I think you are trying to put too much on one report.  An Access report isn't like an Excel workbook where you can make multiple worksheets in one workbook and put anything you want on a given worksheet.

The easiest thing to do would be to make two report objects: Your chemical usage report and your summary report and just print them both separately. However ... it might be possible to use Domain functions (ie DLookup, DSum, DCount, etc.) in the Footer to make your Summary Page if you can get the footer to appear on a separate page.  If you have a lot of chemicals though, the latter would be tedious and would not be dynamic.  You'd physically have to create one field per chemical.

The best solution is to create two reports and run them separately or run them together in a macro or vba module.
Random Solutions  
 
programming4us programming4us