Variable Sub-report

  • Thread starter Thread starter QB
  • Start date Start date
Q

QB

I currently built a report in which I now need to add a twist.

I need to use the detail section, as is, 90% of the time, but for specific
type of record would need it to be replaced by a sub-report.

Since this report contain numerous record it would call the detail section x
times, use the sub-report, use the detail....

can this be done? and how would I need to approach it?

Thank you!!!

QB
 
QB said:
I currently built a report in which I now need to add a twist.

I need to use the detail section, as is, 90% of the time, but for specific
type of record would need it to be replaced by a sub-report.

Since this report contain numerous record it would call the detail section x
times, use the sub-report, use the detail....


You can use VBA code in the detail section's Format event
procedure to make the text boxes visible/invisible or the
subreport invisible/visible. This requires some data
value(s?) in the records that can be used to determine what
should/shouns not be visible.
 
You could use code in the On Format event of the detail section to set the
Visible property of the subreport and/or other controls.
 
Back
Top