Multiple Copies of a Subreport on One Report

  • Thread starter Thread starter Caroline Middlebrook
  • Start date Start date
C

Caroline Middlebrook

Hi,

I have a report that needs to represent a weeks worth of data with the
days printed horizontally across the page. I have implemented this by
using a subreport for the data for the day and then putting in 7
copies of that subreport on the main report.

My problem is that because each one represents a different day of the
week I'd like a way to either filter the data for each one to a
particular date, or pass in a date parameter. I've not found a way to
do this so as a workaround I've created 7 different subreports with
their own recordsource that differs slightly which seems silly. I
posted about this problem a few days ago but I don't think I explained
myself very well.

I know I could put all of the data on one report and simply group on
date but visially this would not look good at all so I want to keep
the layout I have.

Any help appreciated, thanks.

Caroline M.
 
You can probably use the LinkMasterFields/LinkChildFields property of the
subcontrol.

Assuming the subform has a date field, and you want to filter on this date,
you can place a text box on the main report above each subreport. Set this
text box so it gets the right date, and enter the name of the text box into
the subreport's LinkMasterFields property. Repeat this for the other
subreports. Now each subreport displays only the data that matches the date
in its text box.
 
Back
Top