Print

  • Thread starter SwEdIsH_OfFiCe_UsEr
  • Start date
S

SwEdIsH_OfFiCe_UsEr

How do I add buttons that print my report after I've viewed it? I want to
preview my report in basic viewing mode that comes up when I run it and print
from that view, like previewing in say excel, but I can't get buttons to work
like in other areas. How do I do it?

Also, can I add a function to choose which columns to add in the preview
manually without creating an entirely new form? I want to be able to choose
which values to be printed in a smooth way integrated in my search form for
my report, is that possible?
 
K

Klatuu

If you have a report open in Preview mode, you can right click and select
Print from the menu. To use your own command button, the code in the
button's click event would have to close the preview and open the report in
print mode.

As to selecting which columns to preview, it could be done, but not easily.
You would have to write your own code and it would be complex.

A basic approach would be to use a form with a check box for each column
that would indicate whether it should be included on the report. Then you
would need to add code to your report's Open event to show or hide controls.
 
S

SwEdIsH_OfFiCe_UsEr

Ok, so it's not even possible to get a button available in report preview
mode? All I get is the page and the cursor turns into a magnifying glass, and
any button I add is unclickable. What I want is really a user friendly
interface that allows for all desired actions through buttons, and I stuck on
printing report after viewing. What should I do?
 
K

Klatuu

Reports are not interactive. That is, you can't use buttons on a report. It
has to be done with forms. There is also another issue. Some properties of
reports can't be set during runtime. They have to be set in design view.

Using VBA, It is possible to open a report in design view, make changes, and
save the report with the changes. You can even hide the report so the user
will not see it during the design phase; however, I would not recommend this.
If you have users who don't have sufficient rights or you compile to an mde,
they will not be able to execute such functions.
 
L

Larry Linson

Some interaction, I understand, is available in Access 2007... whether that
includes what you want to do, I couldn't say, as I don't use Access 2007.
In earlier versions, the designers / developers of Access understood that
Forms are for viewing; Reports are for printing, and they did not support
buttons or other interactions on reports, even in Preview. Right-click on a
context menu doesn't seem too unfriendly to me. You could also leave the
menu active, so the user could use the traditional Menu | File | Print.

Over the years, I have observed a number of attempts to provide users with a
simple approach to selecting columns to print in Reports. I have not
observed any that were successful... they were either clumsy, or too
limited, and any users who wanted customized reports ended up spending a
minimal amount of time learning basic Access reporting, instead. But
sometimes, a company had spent a lot on implementing something for their
users to try. <SIGH>

Larry Linson
Microsoft Office Access MVP
 
K

Klatuu

Sadly true, Larry.
And COBOL was written so business users could build their own applications
without having to deal with those pesky Assembly programmers.
 

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