Supress or Hide empty fields in a report


Paul Martin

Following help from this group - thanks - I can now print individual address
labels on my label printer from with in a form.

I would like to enhance this further if possible. Is there a way to ignore
empty fields?

The problem is that the rows in a lable are: -
Title, forname, surname
address 1
address 2

so with Smiths Models, 27 A Street, Some City, 68756, Outer Mongolia I get

Smiths Models,

27 A Street,

Some City,

Outer Mongolia

Can I make it ignore the blank lines?

Paul Martin


Set the CanShrink property of each control to true (Yes in the properties
sheet). Make sure that all the controls abut the one above without any space
between them as the 'white space' between controls does not shrink. You'll
probably need to set the control height bigger than the font height to ensure
there are no gaps vertically. Don't set the detail section's CanShrink
property to True though in the case of labels. Note however that if there
are any non-shrinkable controls alongside the shrinkable ones, including
graphic elements such as lines or boxes, the controls won't shrink. In that
case the best way is to concatenate all the fields into a single control,
with carriage returns/line feeds between them and suppress the carriage
return/line feeds where a field is Null.

Ken Sheridan
Stafford, England

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