Subreport change record source...

  • Thread starter Thread starter GB
  • Start date Start date
G

GB

Hello:
I have main (parent) report with subreport on it.
The main report record source returns multiple records, that is why main
report create multiple pages. Each page contains subreport which must
be open with new record source for each page of main report (new page - new
record source). I try to update subreport record source on subreport
Report_Open event, but it updates for the first page of main report only.
My question is: On which event of main report I can
change the subreport record source?

Thanks,
GB
 
GB said:
I have main (parent) report with subreport on it.
The main report record source returns multiple records, that is why main
report create multiple pages. Each page contains subreport which must
be open with new record source for each page of main report (new page - new
record source). I try to update subreport record source on subreport
Report_Open event, but it updates for the first page of main report only.
My question is: On which event of main report I can
change the subreport record source?


The subreport's Open event is the only place that you can
set its record source. Not only that, but can only do it
the first time the open event executes, so this approach is
doomed.

You should try to find a way to use the main report's
subreport control's Link Master/Child properties to limit
the subreport data.
 
Back
Top