How to stop a section from printing

T

Tom

I thought that by setting Cancel = True in the Onprint
event of a section would stop it from being printed.

The controls are not printed but a blank line is printed.
 
S

Steve Schapel

Tom,

In a nutshell, the Format event of the section has been done by the time
the Print event comes around, which includes setting up the height for
printing of the section, so if you cancel the Print event, the section
doesn't print but the same amount of space os reserved for the section
in the printed report anyway. In other words, cancel the Format event
instead, or alternatively set the section's Visible property to False in
the Format event, will probably achieve the desired results.
 

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