ADP and Subreports

  • Thread starter Thread starter amg51
  • Start date Start date
A

amg51

If in an ADP you open a Report using a Stored procedure and set the Input
parameter as e.g
@orderno int = Forms!Orders.Orderno and you have a subreport Order lines
which is more efficient

a) Link parent and Child fields
b) Leave parent and Child links blank and have another stored procedure also
with the same Input parameter

( I also posted this in the Reports forum)
 
To my limited knowledge, Link parent and Child fields should work only when
the source of the subreport is something simple like a table, a view or a
select query (and even then, I'm not sure).

In my opinion, the best way with subreport is c) Use a stored procedure
whose parameters have the same names as one or more fields of the parent
report (less the @). For example, if the source of the parent is:

Select IdSchool, SchoolName from ...

then the parameter « @IdSchool int » would be perfect for the subreport.

Note: if the value of IdSchool is not displayed (or bound to a control) in
the parent report, then you may have to create an hidden (not visible)
textbox and bind the value of [IdSchool] to it.
 
Back
Top