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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Make Blank Fields NOT show up on a report

Status
Not open for further replies.

Ogart

Technical User
Mar 26, 2003
104
US
Greetings:
I've got report where there are more than a few fields that will be blank. (Don't ask. Long story. Yes, It's designed okay).

When I print the report, I'd like these blank fields to not show up. I'd also like the space that I've accounted for these fields to pull up. Is this possible?

And, as long as I'm at it, I would like a steaming hot cup of yummy coffee.

Thanks in advance for your help!


-->Just because you can, doesn't mean you should.
 
Set the "CanGrow" and "CanShrink" properties of each possible blank field to Yes or True. Set the "CanGrow" and "CanShrink" properties of the Detail section to Yes or True. This should solve your problem.

Now, for that steaming hot cup of coffee....
 
Also you need to make sure that you don't put a field that will be populated alongside one that will be blank otherwise it will keep the Shrink from woring and you will be back with a blank slot

Frank J Hill
FHS Services Ltd.
frank@fhsservices.co.uk
 
Well, I struggled to get the coffeemaker working this morning without it spilling all over the counter. Looks like it has bit the dust and will have to be replaced. Thank God for coffee singles.

As for making controls disappear? Just how would you like them to act. Become invisible? Have their height turn to zero? This is all possible.

You can put VBA code in the Detail Sections On Format:
If IsNull(me.controlname) then me.controlname.visible = false
or
If IsNull(me.controlname) then me.controlname.height = 0

Or you can just create the control with its height being 0 which will make the control look like a thin line. This should then be pushed to the top of the section. The Can Grow property should be set to Yes. Now only those controls with data will actually populate and show the control in the report. The others will stay as a thin line with nothing in them.

Just a few ways to accomoplish what you are asking for.



Bob Scriver
 
I'm not worthy gentelmen. Awesome. Thank you one and all. Keep looking at this thread and I will let you know of the ultimate success for y'all. Stars for all of you. Thanks again. This forum rocks. Seriously.
-Chris

-->Just because you can, doesn't mean you should.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top