Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hide/collapse space for empty fields in report 11

Status
Not open for further replies.

KarlGB

Technical User
Nov 26, 2002
1
US
Hey Folks,

I will be eternally grateful to anyone with tips on this question:...

I'm trying to create a simple report pulling in fields from one table and no fancy filtering. However, I want the report to hide fields and field labels (and collapse that space) that DO NOT contain any information (empty fields).

I assume there is a way to do this by basing the report off of a query... but haven't a clue as to the criteria I would use..

Any advice anyone!? Thanks ahead of time!!

Karl
 
Hi,

There is also a rather undocumented command that you may had to the section's On Format event that goes like:

Me.MoveLayout = True

If the visibility of fields is handled through code, it compacts the space. It is not that useful in column layout but for a single column report it does the job of reducing the blank space left by empty fields.
 
Maltes: Star for you. Hadn't stumbled across this one before but it looks very useful in certain situations. Thanks for the heads up.

Bob Scriver
Want the best answers? See FAQ181-2886
Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???

 
I have the same problem but since i don't alow blank data in most of my fields an N/A is entered into this area. can i possibly do the same thing but to shrink if the label is N/A?
 
You might try something like this:

IIF(Me![LabelName]="N/A",Null,Me![ControlName])

You will have to experiement where to put this code. Could be the OnFormat event procedure of the Detail Section. It all depends on when you set the label to N/A and just when the formating takes place for your report.

Post back with how it works for you. If you can please explain how you are changing the label caption property and maybe I can figure out how to make this happen.

Bob Scriver
Want the best answers? See FAQ181-2886
Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???

 
Help!
I have got the same problem as what was first posted, i have tried all the responses.
The CanGrow function removes the corresponding field labels and i can't get them back. And the CanShrink function does not shrink anything. Nothing changes with it, and i have tried all the properties. Is there something i have missed? Can you help. Please! I would be very grateful.

 
Is there a similar solution when using combo boxes? I have a report that's based on a query that uses combo boxes - and combo boxes don't have CanGrow or CanShrink properties. (unless I'm missing something)

Any solutions out there?

Thanks!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top