Search code examples
ms-accessms-access-2013

Combining two reports to one in Access 2013


I've two reports in my DB that I want to combine. Both these reports have various fields populated from preceding steps and a hyperlink that opens a form for further processing. The form auto-populates some of the fields using the data from the report with

=[Reports].[MyReport].[LineItemID]

I'm using a 3rd unbound form to put the 2 reports on a single screen (using simple drag and drop). The hyperlinks on both the reports don't read data from respective reports anymore. I tried using

=[Reports].[MyReport1].[LineItemID] to read from individual reports and also

=[Reports].[CombinedReport].[LineItemID] to read from the combined report but doesn't seem to be working.

Any pointers on this would be very helpful.

Thanks,


Solution

  • When you placed the two reports into the unbound report, you also created a control of type subform/subreport for each in the unbound report.

    This you have to respect in your reference. You will have to check and use the names of these controls.

    So if the control for the first report would have been named MySubControl1 this is your full reference:

    =[Reports].[MyReport1].[MySubControl1].[Report].[LineItemID]
    

    The extra .[Report] is included because you now also need to explicitly reference the content of the control (which in this case is a report) to actually have a reference to your embedded report object, and be able to reference the required LineItemID control within it.