A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Report Can Grow not aligned horizontally



 
 
Thread Tools Display Modes
  #1  
Old April 6th, 2010, 10:59 PM posted to microsoft.public.access.reports
viking
external usenet poster
 
Posts: 4
Default Report Can Grow not aligned horizontally

I have a report where I have 1 row of text, memo, number, and date fields.
The memo field can contain up to 4-5 lines of wrapped text. I have set all
teh rows to "can grow". However, on my report, the conditional formatting
doesn't grow.

For instance, the fill (which I have set to a gray color) in the memo field
is about 3 lines deep when there is a lot of text in the memo field, but the
text and number fields associated with that record are actually only 1 line.
This essentially looks like a mess, small gray filled boxes for the text
fields and a large gray filled box for the memo field.

I just want simple rows that have the same height (they actually have the
same height per se, but the fill of the record doesn't match up).

Using columnar layout in access 2010 solves the problem, but then the
database is not able to be open in 2007, which renders it essentially useless.

Any thoughts?
  #2  
Old April 7th, 2010, 04:36 AM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Report Can Grow not aligned horizontally

Viking wrote:

I have a report where I have 1 row of text, memo, number, and date fields.
The memo field can contain up to 4-5 lines of wrapped text. I have set all
teh rows to "can grow". However, on my report, the conditional formatting
doesn't grow.

For instance, the fill (which I have set to a gray color) in the memo field
is about 3 lines deep when there is a lot of text in the memo field, but the
text and number fields associated with that record are actually only 1 line.
This essentially looks like a mess, small gray filled boxes for the text
fields and a large gray filled box for the memo field.

I just want simple rows that have the same height (they actually have the
same height per se, but the fill of the record doesn't match up).

Using columnar layout in access 2010 solves the problem, but then the
database is not able to be open in 2007, which renders it essentially useless.



I don't know what A2010 can do about that, but I have never
seen the growth of one text box affect the Height of any
other text box. What I have always done is use the
section's Format event to precalculate the eventual height
of the text box that will grow (see TextHeightWidth at
www.lebans.com). Then set the Height of the other text
boxes to the calculated height.

That is necessary because the final height of the growing
text box is not available until the Print event, but the
Print event is too late to change the size/position of
controls.

--
Marsh
MVP [MS Access]
  #3  
Old April 7th, 2010, 01:31 PM posted to microsoft.public.access.reports
Duane Hookom
external usenet poster
 
Posts: 7,177
Default Report Can Grow not aligned horizontally

If the text boxes all have their background set, I'm not sure why you don't
set the background of the detail section.

However if you want to set the background of one or more controls in the
report section, you can set the Tag property of these controls to "Border".
Then add this code to the On Print event of the section:

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Dim intMaxHeight As Integer
Dim ctl As Control
Dim lngHilite As Long
lngHilite = 10092543 'pale yellow
'Find highest control in Detail section _
that has a tag property of "Border"
For Each ctl In Me.Section(0).Controls
If ctl.Tag = "Border" Then
If ctl.Height intMaxHeight Then
intMaxHeight = ctl.Height
End If
End If
Next
'Draw a box around each control in Detail _
that has a tag property of "Border"
For Each ctl In Me.Section(0).Controls
If ctl.Tag = "Border" Then
'make the background pale yellow
Me.Line (ctl.Left, ctl.Top)- _
Step(ctl.Width, intMaxHeight), lngHilite, BF
Me.Line (ctl.Left, ctl.Top)- _
Step(ctl.Width, intMaxHeight), vbBlack, B
End If
Next
End Sub

--
Duane Hookom
Microsoft Access MVP


"Marshall Barton" wrote:

Viking wrote:

I have a report where I have 1 row of text, memo, number, and date fields.
The memo field can contain up to 4-5 lines of wrapped text. I have set all
teh rows to "can grow". However, on my report, the conditional formatting
doesn't grow.

For instance, the fill (which I have set to a gray color) in the memo field
is about 3 lines deep when there is a lot of text in the memo field, but the
text and number fields associated with that record are actually only 1 line.
This essentially looks like a mess, small gray filled boxes for the text
fields and a large gray filled box for the memo field.

I just want simple rows that have the same height (they actually have the
same height per se, but the fill of the record doesn't match up).

Using columnar layout in access 2010 solves the problem, but then the
database is not able to be open in 2007, which renders it essentially useless.



I don't know what A2010 can do about that, but I have never
seen the growth of one text box affect the Height of any
other text box. What I have always done is use the
section's Format event to precalculate the eventual height
of the text box that will grow (see TextHeightWidth at
www.lebans.com). Then set the Height of the other text
boxes to the calculated height.

That is necessary because the final height of the growing
text box is not available until the Print event, but the
Print event is too late to change the size/position of
controls.

--
Marsh
MVP [MS Access]
.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:38 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.