Link to home
Start Free TrialLog in
Avatar of CavMom
CavMom

asked on

Microsoft Access 2003 Report Design - Eliminating White Space

We have a report where the design is as follows:

DocNo                 IdInfo
                            Summary

The IdInfo control is based upon an IIf statement to combine four fields of the table.  Summary is a Total Access Memo ActiveX add-in to allow for formatting of the text in the memo field.  In certain instances, IdInfo will contain no data and, therefore, leaves a blank space in the report.  What can we do to get rid of that blank space when there is no data to fill the IdInfo control?

Thanks!
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

set the  can grow and can shrink property of the control to YES

see this link

How to eliminate white space in reports with CanShrink and code in Access
http://support.microsoft.com/?kbid=299011
Avatar of CavMom
CavMom

ASKER

Thanks for the speedy response.  That doesn't work since the DocNo control is to the left of IdInfo.  The can grow and can shrink only work if the entire vertical area is empty.  The DocNo control needs to remain where it is and Summary needs to move up if IdInfo is empty.
Is the IdInfo control the TA Control you refer to?  If so:

Basically, in the OnFormat of the section the TA control is in, check the Summary Total first ... if zero, the make the TA control No visible and set it's Height to 0,  otherwise make it visible and set the height to the desired size ... or even just deal with the Height ...and leave Visible set to Yes.

mx
Avatar of CavMom

ASKER

No, the IdInfo control is a text box containing an IIf statement combining four fields of the table.  The TA control (Summary) is beneath it.

DocNo (numeric control)                IdInfo (text box with IIf statement combining four fields of table)
                                                       Summary (TA control)

The IdInfo control is the one which may or may not have data.  If it does not, a blank line appears next to the DocNo.  
Ok ... then try the same thing I mentioned above on the IdInfo text box ... can you do that?

mx
Actually, try wrapping the Idinfo control in a subreport control ...  and set the Can Grow/shrink ...

mx
ASKER CERTIFIED SOLUTION
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
why not...

in detail_format

if isnull(IdInfo) or trim(idinfo) = "" then
  idinfo.visible = false
  summary.top = idinfo.top
else
  idinfo.visible = true
  summary.top = idinfo.top + idinfo.height + 100 '100 can be anything, its just the default spacing
end if

that way everything lines up all nice

you may also need to add
detail.height = tallestcontrol.height+tallestcontrol.top
to squeeze detail backtogether
"mx: I tried your suggestion, "

Mine actually seemed to almost exactly line up.  Maybe a default printer difference?

mx
mx: yeah, who knows? access reporting sure isn't an exact science!  (^v°)
Avatar of CavMom

ASKER

I appreciate all of your responses.  Haven't had a chance to get back to the project this morning but I will before the day is out.
CavMom:
Thank you for coming back and closing out. Very cool.

mx
Avatar of CavMom

ASKER

I apologize for not doing it sooner.  Today has been the first day that I've been back on this project.  Thanks for the help!
No problem.  We just appreciate you coming back. Many do not!

thanks again.

mx