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!
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!
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
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
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.
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
mx
Actually, try wrapping the Idinfo control in a subreport control ... and set the Can Grow/shrink ...
mx
mx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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+tall estcontrol .top
to squeeze detail backtogether
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+tall
to squeeze detail backtogether
"mx: I tried your suggestion, "
Mine actually seemed to almost exactly line up. Maybe a default printer difference?
mx
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°)
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
Thank you for coming back and closing out. Very cool.
mx
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
thanks again.
mx
see this link
How to eliminate white space in reports with CanShrink and code in Access
http://support.microsoft.com/?kbid=299011