Dynamic Printing

  • Thread starter Thread starter Reggie
  • Start date Start date
R

Reggie

Hi and thanks in advance. What I have is a form with it's recordsource set
to the recordsource of a subform my users have open. The users can sort,
filter and hide columns in the subform. When they click a button the report
prints and maintains the sorting and filtering no problem. My problem is
that I only have a few select bound fields in my report. What I would like
is to print all the fields that are still visible in the users subform. I'm
not concerned about the fields extending past the edge of the page. I'm
sort of looking at doing something similar to printing reports based on
crosstab queries where the number over columns can change. Is this
possible! If so could you offer a little advice or point me in the
direction where I can do some more research? Thanks!
 
Reggie,

Try putting unbound controls on your report with something
like the following as the source:

=IIf(Forms!Yourformname.control.Visible=True,
[fieldname],"")

This tests to see if the control is visible on your form
and then puts the control from your report's record source
into the unbound control. You may need to format the
report's controls if they are currency, percent, dates etc.

HTH,

Terry
 
Back
Top