binding subreports to a main report programatically

  • Thread starter Thread starter mike
  • Start date Start date
M

mike

hi. i have subreport that has these fields:
account
regionto
regionfrom
date
it's basically a report that shows accounts transferring
from one region of the country to another. sometimes,
however, the accounts transfers within the same region.
i'd like to include this transfer data on a main report we
have that is grouped by region.

i was hoping to bind the subreport above but when i try to
bind the region field on my main report with regionto, i
only see the transfers INTO the region on the main report.
when i bind to transfer from, i only see the transfers OUT
OF the region on the main report. when i bind to both, i
only see the transfers WITHIN the region on the main
report.

is there a way to say something to the effect of bind
region with regionto OR region with regionfrom?
 
I would use a query instead where I would relate the
Region table to the transfer table with both the regionto
and regionfrom where I would select all from the region
table and only those matching from the transfer table
Than I would filter for not null in the regionto OR the
region from. This should give you the necessary source
data. Now you can create the subreports from this query.
Hope this gets you going.
Fons
 
Back
Top