Dynamic Printing

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!
 
T

Terry

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top